T
Tom
Hi,
In the following code I have reproduced a problem in IE that is
extremely annoying for my application.
<html>
<head>
<script type="text/javascript">
function mouseover(id){
document.getElementById("debugmessages").innerHTML += "MouseOver
"+id+"<br>\n"
}
function mouseout(id){
document.getElementById("debugmessages").innerHTML += "MouseOut
"+id+"<br>\n"
}
</script>
</head>
<body>
<img onDrag="return false" onmouseover="mouseover('1')"
onmouseout="mouseout('1')"
style="position:absolute;left:10;top:10;height:50;width:50;" src="">
<img onDrag="return false" onmouseover="mouseover('2')"
onmouseout="mouseout('2')"
style="position:absolute;left:60;top:10;height:50;width:50;" src="">
<div style="position:absolute;top:70;">
<div
onclick="document.getElementById('debugmessages').innerHTML=''">Clear
Messages</div>
<div id="debugmessages"></div>
</div>
</body>
</html>
To reproduce the problem, move the cursor to as fas as you can to the
right within the leftmost image placeholder. Then hold down the left
mouse button and move the mouse to the right image placeholder (I did
not load actual images as its not needed to demonstrate the problem).
Looking at the events listed below the placeholders, you can see that
cell 1 is getting an extra onmouseover event AFTER the onmouseout event
has been handled. Additionally, when this behaviour is displayed, cell
2 does not get an onmouseover event.
I think this is something to do with when the onDrag event is being
fired. If you repeat the above but depress the left mouse button while
the mouse is in the middle of the image and then move to the other
image, all is OK. The problem only seems to occur if the distance moved
with the button down, before leaving the cell, is less than the
distance that is needed for onDrag events to be fired. So in the above
example, the onDrag event is fired (and is handled, possibly
incorrectly, by me) after the cursor has left the cell - I believe this
to be causing confusion somewhere.
Any ideas?
Thanks,
Tom...
In the following code I have reproduced a problem in IE that is
extremely annoying for my application.
<html>
<head>
<script type="text/javascript">
function mouseover(id){
document.getElementById("debugmessages").innerHTML += "MouseOver
"+id+"<br>\n"
}
function mouseout(id){
document.getElementById("debugmessages").innerHTML += "MouseOut
"+id+"<br>\n"
}
</script>
</head>
<body>
<img onDrag="return false" onmouseover="mouseover('1')"
onmouseout="mouseout('1')"
style="position:absolute;left:10;top:10;height:50;width:50;" src="">
<img onDrag="return false" onmouseover="mouseover('2')"
onmouseout="mouseout('2')"
style="position:absolute;left:60;top:10;height:50;width:50;" src="">
<div style="position:absolute;top:70;">
<div
onclick="document.getElementById('debugmessages').innerHTML=''">Clear
Messages</div>
<div id="debugmessages"></div>
</div>
</body>
</html>
To reproduce the problem, move the cursor to as fas as you can to the
right within the leftmost image placeholder. Then hold down the left
mouse button and move the mouse to the right image placeholder (I did
not load actual images as its not needed to demonstrate the problem).
Looking at the events listed below the placeholders, you can see that
cell 1 is getting an extra onmouseover event AFTER the onmouseout event
has been handled. Additionally, when this behaviour is displayed, cell
2 does not get an onmouseover event.
I think this is something to do with when the onDrag event is being
fired. If you repeat the above but depress the left mouse button while
the mouse is in the middle of the image and then move to the other
image, all is OK. The problem only seems to occur if the distance moved
with the button down, before leaving the cell, is less than the
distance that is needed for onDrag events to be fired. So in the above
example, the onDrag event is fired (and is handled, possibly
incorrectly, by me) after the cursor has left the cell - I believe this
to be causing confusion somewhere.
Any ideas?
Thanks,
Tom...