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

> As @kochi said in #358 (comment), in terms of a document tree, that would cause two active elements in a document tree, `focusable2` and `x-foo`, if we adapt what the following says. That will violate a lot of assumptions and what we would like to avoid, I think.

Not at all.  Just because `ShadowRoot.activeElement` point to a slot, it doesn't mean the document contains multiple active elements.  There is a single focused/active element in the document, and each shadow root's activeElement just points to the slot containing that active/focused element.

That is, I'm not suggesting to focus the slot element when the slot contains a focused/active element.  I'm simply suggesting to make `ShadowRoot.activeElement` return the slot that contained focused/active element without ever focusing the slot element.

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

Received on Thursday, 4 February 2016 03:14:39 UTC