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)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
DUPLICATE
of bug 552707
mozilla9
People
(Reporter: snikumbh, Assigned: masayuki)
Details
(Keywords: regression, testcase)
Attachments
(1 file)
1.12 KB,
text/html
|
Details |
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
![]() |
||
Comment 2•15 years ago
|
||
* 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.
![]() |
||
Comment 5•15 years ago
|
||
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
Comment 6•15 years ago
|
||
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.
Assignee | ||
Updated•14 years ago
|
Assignee | ||
Comment 7•14 years ago
|
||
I confirmed that this bug is fixed by the patch of bug 552707.
Assignee | ||
Comment 8•14 years ago
|
||
fixed by bug 552707.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Assignee | ||
Comment 9•14 years ago
|
||
Temporarily, backed out for risk management of mozilla8, see bug 675865.
For simpler management, I mark this bug as dup of bug 552707.
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•