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.