问题
Jquery autocomplete breaks the undo in IE, In case of textarea what may be the reason ?
Try this,
Open this link in IE
http://jqueryui.com/demos/autocomplete/#multiple
Type any text in input element, for example type 'a' select 'ActionScript' from menu now do backpsace to remove characters.
Now do undo ctrl + z , It's not working why ? can any one explain ?
Thanks in advance
回答1:
I had a similar problem:
Html text input undo not working
In the end I found out that if any JavaScript updated any visual elements, all the text boxes on the page had their undo history reset. In my case it was a timer updating a countdown clock, which made it very difficult to trace and debug. I imagine it is the autocomplete JQuery causing the problem here. The difference to mine is that it is updating the actual textbox, not an external element, but I suspect it is the same issue. I'm pretty sure it's a bug in IE so there's not a lot you can do about it, short of adding your own history functionality to the text box.
This is a problem specific to Internet Explorer - I suggest you try your page with Chrome or Firefox.
来源:https://stackoverflow.com/questions/8846516/undo-ctrl-z-is-not-working-for-text-area-when-i-use-jquery-autocomplete-in-i