Closed
Bug 357679
Opened 19 years ago
Closed 14 years ago
Setting overflow:auto|hidden on DIV is canceling events
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
DUPLICATE
of bug 552707
mozilla9
People
(Reporter: mitch, Assigned: masayuki)
Details
(Keywords: testcase)
Attachments
(1 file)
|
579 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
When overflow:auto|hidden is set on a DIV element, the event.target never changes. I included test code in additional information. When you mousedown on the DIV, and drag the mouse outside of the DIV element, the mousemove event.target (displayed in the document.title) never changes. If overflow is removed from the DIV element, this works just fine.
Reproducible: Always
Steps to Reproduce:
USING THE TEST I ADDED IN ADDITIONAL INFORMATION:
1. Set overflow:auto|hidden on DIV element inside of the body.
2. Mouse down inside of DIV.
3. With the mouse down, move outside of the DIV.
4. The document title shows that the mousemove event.target never changes from the DIV element, no matter where you are on the page.
5. Remove overflow from the DIV element.
6. Repeat steps 2,3.
7. The document title shows that the mousemove event.target changes as you mousemove across the page. That's how it should work.
Actual Results:
With overflow:auto|hidden on the div element, when you mouse down inside of the DIV, and move your mouse around the page, the mousemove event.target does not change.
Expected Results:
With overflow:auto|hidden on the div element, when you mouse down inside of the DIV, and move your mouse around the page, the mousemove event.target should change accordingly. It works if overflow is not set on the DIV. The mousemove event.target should work if overflow is set on the div or not.
This is the sample code:
<html>
<head>
<title>Test Page</title>
<script>
var drag_obj;
document.onmousedown = handle_mouseDown;
document.onmousemove = handle_mouseMove;
document.onmouseup = handle_mouseUp;
function handle_mouseDown(e)
{
drag_obj = e.target;
}
function handle_mouseMove(e)
{
if (drag_obj)
{
document.title = e.target;
}
}
function handle_mouseUp(e)
{
drag_obj = undefined;
}
</script>
</head>
<body>
<div style="overflow:hidden; width:300px; height:200px; border:#333333 1px solid;">Test Text</div>
</body>
</html>
Comment 1•19 years ago
|
||
Updated•19 years ago
|
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
Comment 2•19 years ago
|
||
I think this is basically the same as bug 294844.
Assignee: nobody → events
Component: Layout → Event Handling
Depends on: 294844
QA Contact: layout → ian
Version: 1.8 Branch → Trunk
Comment 3•18 years ago
|
||
check out bug 378106, I noticed the same bug in a different way (hadn't found this bug, so maybe my bug is a duplicate), and posted a simple test case with the onmouseout event (it will not fire if mouse is held inside an element with overflow hidden|auto|scroll.).
Updated•16 years ago
|
Assignee: events → nobody
QA Contact: ian → events
| Assignee | ||
Updated•15 years ago
|
| Assignee | ||
Comment 4•14 years ago
|
||
Fixed by bug 552707 but you can see same issue if you mousedown in <input> or <textarea>. If you think it's still problem, please file a new bug.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
| Assignee | ||
Comment 5•14 years ago
|
||
And also <iframe>.
| Assignee | ||
Comment 6•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•7 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
•