RESOLVED WORKSFORME 10457
Disabling of default action in mouseup handler disables mousemove event
https://bugs.webkit.org/show_bug.cgi?id=10457
Summary Disabling of default action in mouseup handler disables mousemove event
Miroslav Juhos
Reported 2006-08-17 04:45:24 PDT
Overview Description: Problem is caused by disabling of default browser action in "onmouseup" handler. There are two ways how do that: 1) Set return value of "onmouseup" handler to "false" (see Test case) 2) Call method event.preventDefault() (see Test case modification) Disabling of default action is affecting behavior of other events - but they couldn't be affected (try test case in Firefox). So that after mouseup isn't triggered "mousemove" event in this case. Steps to Reproduce: 1) Open test case in Safari (WebKit) 2) Move mouse up and down over text 3) Click on some text in testcase 4) Move mouse up and down over text Actual Results: When I moved mouse, items are not highlited. Expected Results: When I moved mouse, items will be highlited. Build Date & Platform: Build 2002-008-17 on Mac OS 10.4.7 Test case: <html> <script> function highlight(item) { item.style.backgroundColor = (item.style.backgroundColor == "red") ? '' : 'red'; } onmouseup = function() { return false; } </script> <body> <div onmouseover="highlight(this)" onmouseout="highlight(this)">Item1</div> <div onmouseover="highlight(this)" onmouseout="highlight(this)">Item2</div> <div onmouseover="highlight(this)" onmouseout="highlight(this)">Item3</div> <div onmouseover="highlight(this)" onmouseout="highlight(this)">Item4</div> </body> </html> Test case modification: onmouseup = function(event) { event.preventDefault(); }
Attachments
Testcase (579 bytes, text/html)
2006-08-17 04:47 PDT, Miroslav Juhos
no flags
Testcase2 (555 bytes, text/html)
2006-08-18 04:10 PDT, Miroslav Juhos
no flags
Testcase3 (628 bytes, text/html)
2006-08-18 04:12 PDT, Miroslav Juhos
no flags
Testcase2 (560 bytes, text/html)
2006-08-18 04:15 PDT, Miroslav Juhos
no flags
Miroslav Juhos
Comment 1 2006-08-17 04:47:21 PDT
Created attachment 10088 [details] Testcase
Miroslav Juhos
Comment 2 2006-08-17 07:06:35 PDT
Build Date & Platform should be: Build 2006-08-17 on Mac OS 10.4.7
Miroslav Juhos
Comment 3 2006-08-18 04:10:37 PDT
Created attachment 10119 [details] Testcase2
Miroslav Juhos
Comment 4 2006-08-18 04:12:25 PDT
Created attachment 10120 [details] Testcase3 Try set return value to "false" in omousedown handler - when is set to "false", it will work correct.
Miroslav Juhos
Comment 5 2006-08-18 04:15:11 PDT
Created attachment 10121 [details] Testcase2 Fix of bug in Textcase2 (missing variable event)
Alexey Proskuryakov
Comment 6 2007-07-02 06:32:02 PDT
I cannot reproduce this issue with any of the attached tests (r23841).
Frank Y
Comment 7 2008-12-03 09:44:58 PST
Cannot reproduce issue. Webkit-r38386, Computer-G4 Powerbook, OS-OSX 10.5.5
Alexey Proskuryakov
Comment 8 2009-02-09 08:23:58 PST
Closing, because this was not reproducible.
Note You need to log in before you can comment on or make changes to this bug.