Closed Bug 674955 Opened 13 years ago Closed 13 years ago

`mouseout` does not fire when element removed

Categories

(Core :: DOM: Events, defect)

7 Branch
All
Other
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: james.r.campos, Unassigned)

Details

Attachments

(2 files)

Attached file wat.html
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a2) Gecko/20110707 Firefox/7.0a2
Build ID: 20110707042018

Steps to reproduce:

I removed an element


Actual results:

The element was removed


Expected results:

The `mouseout` event should have fired.

Tested on aurora, nightly.

On Chromium, the event fires on the next `mousemove`.
Attachment #549157 - Attachment mime type: text/plain → text/html
Component: General → DOM: Events
Product: Firefox → Core
QA Contact: general → events
Bug 292146 says it should not fire, but the standard may have changed since then.
Seems similar to https://bugzilla.mozilla.org/show_bug.cgi?id=559561 - When focused element is removed, fire blur event on it
Chrome's behavior is certainly buggy. It is very weird to wait until next
mouse movement before firing the event.

And focus/blur handling is quite different from mouseevent handling.
focus is a state of a node, mouse movement isn't.

Also, the current spec is pretty clear
"A user agent must dispatch this event when a pointing device is moved off of the boundaries of an element". In this case that isn't happening.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Resolution: FIXED → INVALID
The pointing device goes from being within the boundaries of the element, to being outside the boundaries of the element. It's moved off indirectly, by removing the element, but it's still moved off.

Moving the pointer indirectly by scrolling the page triggers the `mouseout` event - how is that any different?
Attachment #549207 - Attachment mime type: text/plain → text/html
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: