Closed Bug 11009 Opened 26 years ago Closed 26 years ago

onMouseOut event handler doesn't appear to be firing properly

Categories

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

x86
Windows 98
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: reboughner, Assigned: rods)

References

Details

(Keywords: verifyme)

Attachments

(6 files)

I've included a sample file which illustrates the problem (this is similar to the example submitted with bug #10820) except here the event handlers are all associated with the parent level UL element. To best see what is happening, move the cursor down from the top over the item "Membership" and then move it back up or move it sideways to the right (even with Membership) and then back to the left. The dump statements included with the example show that the mouseout event doesn't fire until moving back in to the left when on the same line as the Membership line. It doesn't fire when moving the cursor up and down just over "Membership". Also, the color change for the text (from blue to black) doesn't occur either.
Forgot to mention that this test was done with the M8 build on a Windows 98 machine.
Someone recently mentioned (on mozilla-layout, I think) that mouseout events were being fired against the element being entered rather than the one exited. (What happens when one isn't entered?) This seems (??) to agree with what I am seeing in: http://www.fas.harvard.edu/~dbaron/dom/test/two-events/mousemove although there may be some other strange things happening.
The sample page at http://www.widomaker.com/~reboughner/Gecko/table_list.htm illustrates the problem mentioned by David Baron very well. The dump statements show that the onmouseout event is not firing for the B and SPAN element. This example was run with the M8 build on a Windows 98 machine.
There are also problems in the third testing area (called "Onmouseout target") of http://webfx.eae.net/gecko/testEvents.html related to this bug. See bug 2989 for the other problem on that page, in the second testing area (now fixed). (The first area uses IE-specific syntax.)
Assignee: joki → rods
Status: NEW → ASSIGNED
Whiteboard: Appears to work
From what I can tell of testEvents.html tests, everything is working fine. If I don't hear back I will be marking this fixed.
There is still way too much red in http://www.fas.harvard.edu/~dbaron/dom/test/two-events/mousemove for this to be fixed. (There probably should be some red once it is fixed, because capturing doesn't work yet, I think. If you want me to write a version of that test that doesn't involve capturing, yell.) There are still definitely major problems with mouseout. I think the problem is that it fires when the mouse moves in, instead, i.e., it fires on the wrong element. Removing Status Whiteboard of "Appears to work".
...I forgot to mention I was using Linux apprunner 1999-09-27-08-M11 in the previous comment.
I could really use a very very simple test case with all CSS and JavaScript in the same file and have it attached to this bug. Many of these test cases are too complicated for me to easily track down what is going on. Thanks, Rod
Some (all???) of the problems here seem to be table-specific.
In regards to the comments of rods, a simple example of this problem has been submitted. I've also included some screen snapshots which show what's going on as the cursor is moved over the element. I've also included a text file explaining how the test was carried out. The examples were done with the 1999091713 build of Gecko and seem to confirm some the previous comments of David Barron.
reboughner@widomaker.com: IMO, it's easier for others (who may, as I do, want to look at the bug quickly) if the samples you give are attached as separate files rather than all as one. Attaching a bunch of things as a zip requires me to spend at least 30 seconds downloading it... It also makes quick testing much easier, since the page can be viewed directly from Bugzilla. -David
Here is the output from doing attachment 1916 [details]: mouseover event received on table. - mouse enters table mouseout event received on table. - mouse leaves table to enter the cell mouseover event received on second cell. - mouse is in the cell mouseover event received on table. - mouseover bubbles from cell to table mouseout event received on second cell. - ?? (entering the text in the cell) mouseout event received on table. - bubbling of ?? mouseout mouseover event received on second cell. - bubbling of mouseover in text mouseover event received on table. - bubbling of mouseover in text David, what is right and wrong with this series of events? I don't think we should be getting mouseover on the text, should we?
Well, two things: * The cell is inside the table, so you shouldn't get a mouseover on the table until the end. * Second, do the HTML event handlers normally bubble? I didn't think they did for onmouseout/onmouseover. I can't get the example to work in 4.x (using window.alert) so I can't tell what the 4.x behavior was. Did it support these events on tables or cells? I'd have to test in some other way, I guess...
I think this may be working more than it appears to but there may be some misunderstanding as to what should happen here. In fact it may even be fixed as some of the red I see in david's test suite seems to stem from other bugs (e.g. currendNode not working) In repsonse to david's most recent commments: 1. You will get a mouseover and out on the table before the cell because the table has a border and you will hit that first. At that point you are not yet in the cell. 2. Yes, HTML events do bubble except for those specifically stated not to. mouseover/mouseout both bubble.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Marking fixed because of Joki's comments
Keywords: verifyme
Marking verified per joki's comments.
Status: RESOLVED → VERIFIED
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

Created:
Updated:
Size: