Closed Bug 14692 Opened 21 years ago Closed 16 years ago

Event bubbling causes some errors in 4.x content

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: beard, Assigned: joki)

References

Details

(Keywords: dom0)

Attachments

(1 file)

In the O'Reilly HTML guide, it says that onMouseOver should get called when the
mouse first enters the display region occupied by the associated HTML element. In
viewer/appRunner multiple calls are made while the mouse is over the region.
Here's a test case that exhibits this:

<html>
<head>
<SCRIPT>
function raise(obj)
{
	var style = obj.style;
	style.setProperty('z-index', 1 + Number(style.zIndex), '');
	dump('z-index = ' + style.getPropertyValue('z-index') + '\r');
}
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form>
<div id="myDiv1"
onMouseOver="raise(document.getElementById('myDiv1'))"
style="position:absolute;z-index:1;top:10px;left:10px;background-color:gray;
width:100px;height:75px;overflow:scroll">
Hello<BR>Hello<BR>Hello<BR>Hello<BR>Hello<BR>
</div>
<div id="myDiv2"
onMouseOver="raise(document.getElementById('myDiv2'))"
style="position:absolute;z-index:0;top:40px;left:40px;background-color:blue;
width:100px;height:75px;overflow:scroll">
Hello<BR>Hello<BR>Hello<BR>Hello<BR>Hello<BR>
</div>
</form>
</body>
</html>
Assignee: vidur → joki
I think this example may be correct. The mouse over events appear to be bubbling
up from the text nodes into the div tag. So each time you go over a new text
node you get a new mouse over event in the div.

Is this right Tom, or is it a bug?
Yes, this is correct.  We haven't decided yet if we're going to work on some
sort of compatibility mode for events which blocks bubbling but this is working
as designed for now.
Summary: onMouseOver correct? → Event bubbling causes some errors in 4.x content
Target Milestone: M15
Mass-moving bugs out of M15 that I won't get to.  Will refit individual 
milestones after moving them.
Target Milestone: M15 → M16
Actually this shouldn't be M16 as we still haven't decided if or how to fix it.
Target Milestone: M16 → M18
Changing platform to ALL/ALL.
OS: Mac System 8.5 → All
Hardware: Macintosh → All
*** Bug 39939 has been marked as a duplicate of this bug. ***
*** Bug 42835 has been marked as a duplicate of this bug. ***
We currently don't plan to change our event bubbling scheme so I'm going to mark 
this future for now.  If the problem proves severe enough we can explore 
solutions but they tend to get pretty ugly due to lots of special casing.
Status: NEW → ASSIGNED
Target Milestone: M18 → Future
You may want to have a look at the comment I added to 39939.
Adding said comment:

I don't understand, why this bug has been marked as resolved (and #14692 as 
FUTURE). 
The behaviour shown in attachement #9237 is definetly wrong and does not conform 
to DOM2 event handling. DOM2 clear specifies, that mouse events are bubbling. 
Therefore, the mouse over event should bubble from the text frame mentioned in 
previous comments to its parent elements. It looks to me as if event bubbling 
has been implemented only partially.

My quick reply:
RESOLVED does not necessarily mean FIXED or REPAIRED.  It just means that there 
is no more to see here (in the resolved bug).  If a bug has been marked a 
duplicate of a futured bug, it just means that its been noticed and recorder 
before, in addition to not being important enough to be worked on right now.  You 
may disagree on whether or not you think it *is*, in fact, a duplicate, or if it 
is critical enough to have a developer concentrate on this issue.  Just put your 
arguments here and hope they agree with you:).
Keywords: dom0
This bug as filed is WONTFIX; at this point event bubbling is reasonably well
understood by JS authors and compat with NS4 is not an issue.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.