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

RESOLVED FIXED

Status

()

RESOLVED FIXED
14 years ago
9 years ago

People

(Reporter: mats, Unassigned)

Tracking

({testcase})

Trunk
x86
Linux
testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

14 years ago
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

14 years ago
Created attachment 169328 [details]
Testcase
(Reporter)

Comment 2

14 years ago
Created attachment 169329 [details] [diff] [review]
Patch rev. 1
Attachment #169329 - Flags: superreview?(jst)
Attachment #169329 - Flags: review?(bzbarsky)
(Reporter)

Comment 3

14 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.
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

14 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

14 years ago
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)
(Reporter)

Updated

14 years ago
Depends on: 263545
Yeah, ContentRemoved() is called on the root of the subtree that was removed.
(Reporter)

Comment 8

9 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
Last Resolved: 9 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
Need a regression test.
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.