Forum Moderators: open

Message Too Old, No Replies

onmousemove and onmousedown on chrome, safary has problem

         

khoi_nguyen

9:03 am on Aug 30, 2010 (gmt 0)

10+ Year Member



I encountered a problem with onmousemove and onmousedown with chrome on Windows. My code as following:
<html>
<head>
<script language="JavaScript">
var count = 0;
function start() {
var element = document.getElementById("myDiv");

document.onmousemove = onMove;
document.onmouseup = end;
}

function onMove() {
console.log("dragging" + this.id);
}

function end() {
document.onmousemove = null;
}
</script>
</head>
<body>
<div id="myDiv" onmousedown="start()" style="border:1px solid; width:auto" title="this is test only" >this is div test</div>
</body>
</html>


With firefox, when i click only (mousedown event), onmousemove wasn't raised, but on chrome, onmousedown and onmousemove was raise together. I don't understand why

Note: This problem occurs only if my Div tag has title

Fotiman

1:22 pm on Aug 30, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It looks like this might be a bug in either Chromium or Webkit, though it hasn't been confirmed yet:
[code.google.com...]
[code.google.com...]