[Bug 23887] [Shadow] Put only the final destination insertion point to the event path

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23887

--- Comment #82 from Olli Pettay <bugs@pettay.fi> ---
The setup the spec has oddly prioritizes top most shadow trees over the
nested ones.
Using https://www.w3.org/Bugs/Public/show_bug.cgi?id=23887#c62 as an example.
if p1.onclick = function(e) { e.stopPropagation(); }, then nothing
in the shadow tree 2 will see the event during bubble phase.
And since shadow tree 1 is there first also during capture phase, 
p1.parentNode.addEventListener("click", function(e) { e.stopPropagation() },
true); would also prevent shadow tree 2 to see the event.
Why the shadow tree which has the final insertion has lower priority than
the first shadow tree?

And yet default handling doesn't have the same setup.
If you have <a> elements in shadow tree 1 and in shadow tree 2, default
handling goes via the deepest most <a> first, not the one in shadow tree 1.


(There are so many cases which just start to behave oddly when event path
doesn't follow the normal descendant->ancestor path)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 28 March 2014 11:27:24 UTC