When I left-clicked and dragged the mouse, IE9 does not recognize the mousemove event. I need to know where the mouse is when it moves during depression.
Other browsers work fine.
Here is the gist of my code:
<html> <head> <title>IE9 Failure</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> </head> <body> <div id="imgDiv"><img src="http://upload.wikimedia.org/wikipedia/en/1/1e/Cslewis3.JPG" alt="CS Lewis" /></div> <div id="logger"></div> <script> $('#imgDiv').mousemove(displayMouseXYPos); $('img').mousedown(function(event) { event.preventDefault(); }); var i = 0; function displayMouseXYPos(e) { if (!e) var e = window.event; var x = e.clientX + document.body.scrollLeft; var y = e.clientY + document.body.scrollTop; i++; $('#logger').html(i + ') ' + x + ',' + y); } </script> </body> </html>
Just click and drag on the image. Observe the data in the "logger" section in Chrome, FF, Safari, Opera, etc. Then check it out in IE9. How to make IE9 behave like others?
Thank you very much!
gcdev source share