Closed Bug 275621 Opened 20 years ago Closed 15 years ago

blur is fired on element that has been removed from the document

Categories

(Core :: DOM: Events, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: MatsPalmgren_bugz, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

blur is fired on element that has been removed from the document. STEPS TO REPRODUCE: 1. load attached testcase 2. TAB once to put focus on the button 3. hover the button - this will remove it 4. click on a different window ACTUAL RESULTS: blur() was executed for the button EXPECTED RESULTS: nothing BUILDS & PLATFORMS TESTED: Bug occurs in Mozilla 2004-12-19-05 trunk Linux.
Attached file Testcase
Attached patch Patch rev. 1 (obsolete) — Splinter Review
Attachment #169329 - Flags: superreview?(jst)
Attachment #169329 - Flags: review?(bzbarsky)
The NS_ENSURE_ARG_POINTER isn't really necessary to fix this bug - it just seemed like the right thing to have there.
What if the node that's removed is an ancestor of the focused node? This doesn't look like it would handle that case... As for the NS_ENSURE_ARG_POINTER, it should not be needed; the pointer there should not be null unless someone is badly abusing the nsIDocument/ nsIDocumentObserver apis.
(In reply to comment #4) > What if the node that's removed is an ancestor of the focused node? I though nsEventStateManager::ContentRemoved was called for every node... But it isn't. > As for the NS_ENSURE_ARG_POINTER, it should not be needed; oki, I'll remove that then..
Comment on attachment 169329 [details] [diff] [review] Patch rev. 1 bug 263545 will fix this
Attachment #169329 - Attachment is obsolete: true
Attachment #169329 - Flags: superreview?(jst)
Attachment #169329 - Flags: review?(bzbarsky)
Depends on: 263545
Yeah, ContentRemoved() is called on the root of the subtree that was removed.
The testcase fails in a 20090609 build (before new focus manager landing) The testcase works in a 20090611 build (after new focus manager landing) I think this was fixed by the new focus manager (bug 178324). -> FIXED
Assignee: matspal → nobody
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: [FIX] blur is fired on element that has been removed from the document → blur is fired on element that has been removed from the document
Depends on: 178324
Need a regression test.
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: