Why does IE 8 make the cursor jump to the end of the textarea for this JS?
问题 http://jsfiddle.net/tYXTX/ In Firefox, with the above script (included inline below), you can edit the textarea's contents at any point either by clicking in the middle of the string and typing, or using the keyboard back keys (and ctrl+left arrow). In IE, the cursor always jumps to the end. Why is this, and how can I prevent it? HTML: <textarea id="bob" name="bob">Some textarea content</textarea> <div id="debug"></div> JS: $(document).ready(function(){ $("#bob").keyup(function(){ $("#bob")