When I left-click and drag the mouse, IE9 doesn't recognize the mousemove event. I need to know where the mouse is located while it is being moved during it's depressed state.
Other browsers are working great.
Here is the essence 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/C.s.lewis3.JPG" alt="C.S. 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 your mouse over the image. Observe the data readout in the 'logger' div in Chrome, FF, Safari, Opera, etc. Then check it out in IE9. How do I get IE9 to behave like the others?
Many thanks!