The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features
See the new ForumsYou need to be logged in to post in the forums. If you do not have an account, please sign up first.
mouse event bug
Hi!I wrote this code, to demonstrate the mouse event bug:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function mclick(e) {
document.body.innerHTML += '<p>mousedown: ' + e.which + '</p>';
}
function mup(e) {
document.body.innerHTML += '<p>mouseup: ' + e.which + '</p>';
}
</script>
</head>
<body onmousedown="mclick(event);" onmouseup="mup(event);" oncontextmenu="return false;">
<p>buttons:</p>
</body>
</html>
Do the followings:
1: click with the left mousebutton, and hold it down
2: click with the right mousebutton, and hold it down
3: release the left button
4: release the right button
result in Opera:
buttons: mousedown: 1
result in FireFox, Chrome, Safari:
buttons: mousedown: 1 mousedown: 3 mouseup: 1 mouseup: 3
+2 bug:
I wrote oncontextmenu="return false;" into the body, but in Opera the menu will appear.
Mouseup dont works with the middle button