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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: MatsPalmgren_bugz, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
420 bytes,
text/html
|
Details |
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.
Reporter | ||
Comment 1•20 years ago
|
||
Reporter | ||
Comment 2•20 years ago
|
||
Attachment #169329 -
Flags: superreview?(jst)
Attachment #169329 -
Flags: review?(bzbarsky)
Reporter | ||
Comment 3•20 years ago
|
||
The NS_ENSURE_ARG_POINTER isn't really necessary to fix this bug - it just
seemed like the right thing to have there.
Comment 4•20 years ago
|
||
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.
Reporter | ||
Comment 5•20 years ago
|
||
(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..
Reporter | ||
Comment 6•20 years ago
|
||
Attachment #169329 -
Attachment is obsolete: true
Attachment #169329 -
Flags: superreview?(jst)
Attachment #169329 -
Flags: review?(bzbarsky)
Comment 7•20 years ago
|
||
Yeah, ContentRemoved() is called on the root of the subtree that was removed.
Reporter | ||
Comment 8•15 years ago
|
||
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
You need to log in
before you can comment on or make changes to this bug.
Description
•