- From: <bugzilla@jessica.w3.org>
- Date: Tue, 20 Nov 2012 11:25:29 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20017 Priority: P2 Bug ID: 20017 Assignee: dglazkov@chromium.org Blocks: 14978 Summary: [Shadow]: Retargeting relatedTarget algorithm prevents events from be fired if a user creates a MouseEvent manually with a relatedTarget which is same to the target. QA Contact: public-webapps-bugzilla@w3.org Severity: normal Classification: Unclassified OS: All Reporter: hayato@chromium.org Hardware: PC Status: NEW Version: unspecified Component: Component Model Product: WebAppsWG Suppose a user fires an MouseEvent manually as follows: (A) var target = document.getElementById("target"); var newEvent = document.createEvent("MouseEvent"); newEvent.initMouseEvent("mouseover", false, false, window, 0, 10, 10, 10, 10, false, false, false, false, 0, target); target.dispatchEvent(newEvent); In this case, an event should not be fired even at the target node if we follow the (5.2.2): > Event listeners must not be invoked on a node for which the target and relatedTarget are the same. It seems that UA's native MouseEvent never has the relatedTarget which is the same to the target node. But a user generated event can have such a relatedTarget which is the same to the target as I described. For reference, firefox and webkit fires a 'mouseover' event for (A) in the current implementations. How should we resolve this? Option 1): It's okay not to fire an event for (A). I am afraid that this will break the Web. The spec, http://www.w3.org/TR/2001/WD-DOM-Level-3-Events-20010823/events.html, does not tell anything about what we we should do in this case. Option 2): Modify the shadow dom spec so that an event should be fired for (A). -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Tuesday, 20 November 2012 11:25:31 UTC