Closed
Bug 288721
Opened 20 years ago
Closed 20 years ago
[FIX]DOMNodeInserted MutationEvent does not fire for HTMLButtonElement
Categories
(Core :: DOM: Events, defect, P2)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: lucky, Assigned: bzbarsky)
Details
Attachments
(2 files)
2.06 KB,
text/html
|
Details | |
1.08 KB,
patch
|
jst
:
review+
jst
:
superreview+
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2
I almost gave up on using this great EventListener because my first test was the
use of createElement('button') .. and append it to a DIVElement. It would never
fire off the MutationEvent DOMNodeInserted... Finally, went back and simplified
the code.. and found that pretty much any other elements created in the same way
WOULD fire it successfully?
Reproducible: Always
Steps to Reproduce:
1. document.addEventListener('DOMNodeInserted',yourhandler,true);
2. document.createElement('button');
3. [some element in your document].appendChild(newButton);
4. no DOMNodeInserted event called :(
5. replace the document.createElement() w/ any other element tagName, and success.
Actual Results:
No DOMNodeInserted event is called from a HTMLButtonElement;
other elements fire that event properly.
Expected Results:
fire DOMNodeInserted event when button element is appended to DOM
This should display the lack of MutationEvent on insertion of
HTMLButtonElement;
Hope it will help you kill this bug quickly.
Component: General → DOM: Events
Product: Firefox → Core
Version: unspecified → 1.0 Branch
![]() |
Assignee | |
Comment 2•20 years ago
|
||
The mutation event dispatch passes a null prescontext, which makes sense...
Note that if we ever fix dispatchEvent to work without a presentation we'll
need to fix this code to actually deal with a null prescontext, and the same
for input element code, etc...
Assignee: firefox → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Attachment #183244 -
Flags: superreview?(jst)
Attachment #183244 -
Flags: review?(jst)
![]() |
Assignee | |
Updated•20 years ago
|
OS: Windows XP → All
Hardware: PC → All
Summary: DOMNodeInserted MutationEvent does not fire for HTMLButtonElement → [FIX]DOMNodeInserted MutationEvent does not fire for HTMLButtonElement
Version: 1.0 Branch → Trunk
![]() |
Assignee | |
Updated•20 years ago
|
Priority: -- → P2
Target Milestone: --- → mozilla1.8beta3
Comment 3•20 years ago
|
||
Comment on attachment 183244 [details] [diff] [review]
Silly patch
r+sr=jst
Attachment #183244 -
Flags: superreview?(jst)
Attachment #183244 -
Flags: superreview+
Attachment #183244 -
Flags: review?(jst)
Attachment #183244 -
Flags: review+
![]() |
Assignee | |
Comment 4•20 years ago
|
||
Comment on attachment 183244 [details] [diff] [review]
Silly patch
This is no-risk and fixes a silly bug where we don't fire mutation events for
one and only one type of HTML element...
Attachment #183244 -
Flags: approval1.8b4?
Updated•20 years ago
|
Attachment #183244 -
Flags: approval1.8b4? → approval1.8b4+
![]() |
Assignee | |
Comment 5•20 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.8beta3 → mozilla1.8beta4
You need to log in
before you can comment on or make changes to this bug.
Description
•