Strange IE 6 bug?

In IE 6, it appears that if I paste content info a form field that is longer than it’s specified max length, the box consistently takes 5 more characters than it should. For instance. I have a text-input field that has a maxlength of 50. If I paste something that’s 60 characters, it actually copies in 55. Change the maxlength to 55, and I get 60 characters pasted in. Trying this in IE 5.5, it stops right at the specified max length. Which really, is annoying, as I’d been using the maxlength attribute on input fields to delimit text for input into database cell, and it appears I can no longer safely do that.

Can anyone else confirm, or completely dispell this potential bug? Well, I guess not completely dispell, as I’ve re-created this bug in a couple of places now, with a variety of maxlengths, with or without styles affecting the input box too.

update: I take it all back: it’s because I convert all apostrophes (‘) to ' so that they can safely be inserted into the db. Which means that that one character is suddenly six characters, and I had one and only one apostrophe in all my test cases. I’m such a loser sometimes.

4 Replies to “Strange IE 6 bug?”

  1. One more crack like that outta you, mister, and I’m gonna have to ban you! Yeah! that’s it! Or not. I can’t fault a Beck quote. I’ve been listening to him all day.

  2. One more crack like that outta you, mister, and I’m gonna have to ban you! Yeah! that’s it! Or not. I can’t fault a Beck quote. I’ve been listening to him all day.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: