Re: [webcomponents] [Shadow] activeElement behavior seems to break encapsulation (#358)

Here it is:

For `activeElement`, we should calculate as tree-of-trees basis, (the option "B" in @hayatoito 's comment above) instead of current evnet-path based calculation. Even when a distributed element is focused, shadow tree's shadow root should return `null` for `acrtiveElement`.

In the meantime, if any element in a shadow tree gets focused (from outside the shadow tree), its shadow host should get `focus` event rather than the event bubbling is scoped at its shadow root.

That way a "focus" event listener on a shadow host can notice when its shadow content gets focused and also dig into which element gets focused by using its shadow root's `acitveElement`.


---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/358#issuecomment-178476050

Received on Tuesday, 2 February 2016 09:39:47 UTC