Tried what? Adding an event listener? MS has it's own method for that too; attachEvent().
Printable View
Tried what? Adding an event listener? MS has it's own method for that too; attachEvent().
Yes. It had the same effect as yours - counter worked, undo didn't. Also tried a few other things, none of which worked.
You're saying you tested adding an event listener to the textarea element with Vbulletin and had the same result? Hmm........curiouser and curiouser
Well actually no, I just used a regular textarea. It seems to be an underlying problem with IE's handling of keyboard events because it occured with keydown, keypress and keyup - having the event handler breaks undo. I also tried returning false and true and exiting the handler various ways if the Control key was depressed.
Damn, that means I can't fix it. Well thanks MUCHO for testing it, at least you saved my remaining hair! Guess it's ok now to sweep up the hair around my pc chair.
:lol:
OK, the event handler itself plays fine with undo - but if you so much as remotely contemplate altering the document contents from the event handler it breaks it. Even if you set a timeout and then do it.
Blah:
I give up - you could use just addEventListener and have it work in less buggy browsers.Quote:
Originally Posted by [url]http://www.codeproject.com/jscript/htmlarea.asp?df=100&forumid=4685&exp=0&select=1060812#bugs1[/url]
Ah well, we tried. It's not that useful a feature anyway, it's just that I hate giving up on stuff without resolving. It gnaws at me.
FYI I did more testing on this, with a simple page, instead of the much busier forum page, and it's definitely an IE bug. No matter how the function is written or called, undo breaks in IE 6 and 7.