WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
81564
Events do not propagate in disconnected DOM trees
https://bugs.webkit.org/show_bug.cgi?id=81564
Summary
Events do not propagate in disconnected DOM trees
Erik Arvidsson
Reported
2012-03-19 14:28:53 PDT
Given a disconnected DOM tree, we should still do the event propagation. var parent = document.createElement('div'); var child = document.createElement('div'); parent.addEventListener('foo', function(e) { alert(e)}, true); var event = document.createEvent('Event'); event.initEvent('foo', true, true); parent.appendChild(child); child.dispatchEvent(event) Opera and FIrefox both alert here.
Attachments
Add attachment
proposed patch, testcase, etc.
Adam Klein
Comment 1
2012-03-19 14:45:46 PDT
This seems to be due to the inDocument() check at the top of EventDispatcher::ensureEventAncestors:
http://trac.webkit.org/browser/trunk/Source/WebCore/dom/EventDispatcher.cpp#L235
It's been around a long time, dating back to when event dispatch was still in Node.cpp.
Alexey Proskuryakov
Comment 2
2012-03-19 15:47:03 PDT
What does IE do? If IE and WebKit agree, it would take much more than just Firefox and Opera opinion to make this change necessary.
Alexey Proskuryakov
Comment 3
2013-02-20 12:55:53 PST
***
Bug 110353
has been marked as a duplicate of this bug. ***
Erik Arvidsson
Comment 4
2013-03-26 19:31:25 PDT
(In reply to
comment #2
)
> What does IE do? If IE and WebKit agree, it would take much more than just Firefox and Opera opinion to make this change necessary.
IE passes the test in
bug 110353
. This makes WebKit the odd man out.
Alexey Proskuryakov
Comment 5
2013-03-26 20:19:03 PDT
***
Bug 113336
has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Comment 6
2013-04-09 13:43:53 PDT
***
Bug 114023
has been marked as a duplicate of this bug. ***
David Kilzer (:ddkilzer)
Comment 7
2013-04-09 13:44:37 PDT
<
rdar://problem/13178101
>
Lucas Forschler
Comment 8
2019-02-06 09:02:47 PST
Mass moving XML DOM bugs to the "DOM" Component.
Ahmad Saleem
Comment 9
2022-10-22 14:37:42 PDT
Chrome / Blink fixed this in following commit -
https://src.chromium.org/viewvc/blink?view=revision&revision=198153
Alexey Proskuryakov
Comment 10
2022-10-23 12:23:42 PDT
We must have fixed this at some point too, the test passes in Safari 16.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug