Closed Bug 557512 Opened 15 years ago Closed 14 years ago

Using hidden/auto/scroll a as value for "overflow" css property causes firefox to capture mouse events

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 552707
mozilla9

People

(Reporter: snikumbh, Assigned: masayuki)

Details

(Keywords: regression, testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 The code is included at the end of the problem description. I have a DIV with overflow set to hidden. If I click and drag the mouse outside the DIV, it still captures the mouse move events. The behavior is very similar to setCapture in IE. The behavior is same for hidden/auto/scroll values for overflow. Only "visible" seems to be not locking the mouse. *************************************** <html> <head> <script type="text/javascript"> var cnt = 0; function createEventHandlers() { var c = document.getElementById("canvas"); c.style.overflow = 'hidden'; c.onmousedown = function(e){ var e = e || window.event; cnt = 0; document.getElementById("console").innerHTML = cnt; }; c.onmouseup = function(e){ var e = e || window.event; cnt = 0; document.getElementById("console").innerHTML = cnt; }; c.onmouseout = function(e){ var e = e || window.event; cnt = 0; document.getElementById("console").innerHTML = cnt; }; c.onmousemove = function(e){ document.getElementById("console").innerHTML = cnt++; } } </script> </head> <body onload="createEventHandlers();"> <!-- There's a bug in firefox with mouse events for absolute positioned elements. If position of following div is changed to absolute, in firefox, the events don't start firing right away --> <div id="canvas" style="position:static;width:200px;height:200px;background:red"></div> <div id="console"></div> </body> </html> *************************************** Reproducible: Always Steps to Reproduce: 1.Save the above code in a file 2.Click on the DIV and drag mouse outside the DIV boundry 3.Comment out the "c.style.overflow = 'visible';" line and counter will change only when mouse is clicked and dragged on the DIV Actual Results: 1.You will see the counter keeps on increasing Expected Results: I would have expected the same behavior for hidden/auto/scroll as that of visible. I am suing firefox version 3.5.9
I meant to say "I am using firefox version 3.5.9"
* please re-test against your issue with a current trunk build from http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/ (in a new profile). * please attach your testcase(s) showing your issue(s) with "Add an attachment" to this report.
Severity: major → normal
Component: Developer Tools → General
Product: Firefox → Core
QA Contact: developer.tools → general
Version: unspecified → 1.9.1 Branch
I have tried the latest build as suggested and still see the problem.
ok, this is a regression against 1.8.1 on 1.9.0, i.e. works: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 ID:2008121709 fails: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 ID:2010031422 1.8.1 behaves like GC5 dev and Opera 10.52 now do.
Keywords: regression, testcase
Version: 1.9.1 Branch → 1.9.0 Branch
Added a few similar bugs to dependency list. Some of them are reported on 1.8.1, so I don't know about regression, but I definitely see this and didn't find any bugs explaining why this is by design, so confirming.
Status: UNCONFIRMED → NEW
Component: General → Event Handling
Depends on: 470459, 357679, 378106
Ever confirmed: true
OS: Windows XP → All
QA Contact: general → events
Hardware: x86 → All
Version: 1.9.0 Branch → Trunk
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Depends on: 552707
No longer depends on: 357679, 378106, 470459
I confirmed that this bug is fixed by the patch of bug 552707.
fixed by bug 552707.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Temporarily, backed out for risk management of mozilla8, see bug 675865. For simpler management, I mark this bug as dup of bug 552707.
No longer depends on: 552707
Resolution: FIXED → DUPLICATE
Target Milestone: mozilla8 → mozilla9
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: