Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

docs(core): how and when to use delegate-focus-mixin.js #25

Open
lkraav opened this issue Apr 22, 2019 · 3 comments
Open

docs(core): how and when to use delegate-focus-mixin.js #25

lkraav opened this issue Apr 22, 2019 · 3 comments
Labels
docs Something isn't documented

Comments

@lkraav
Copy link
Contributor

lkraav commented Apr 22, 2019

https://github.com/web-padawan/aybolit/blob/116c91840792132bece7f784a364f707537d6d9f/packages/core/src/mixins/delegate-focus-mixin.js

Some @aybolit/core components are using it, but a few are not. What is the decision criteria?

lit/lit-element#586 may be related on upstream end?

@web-padawan
Copy link
Owner

The main reason is that only Chrome currently supports the sequential focus navigation:

this.attachShadow({mode: 'open', delegatesFocus: true});

The mixin is needed whenever you have a focusable element (input, button etc) within a shadow root. https://github.com/vaadin/vaadin-control-state-mixin does pretty much the same thing.

@lkraav
Copy link
Contributor Author

lkraav commented May 15, 2019

Maybe a docs(...): ... commit would be a good idea about this in some README.md.

@web-padawan
Copy link
Owner

The mixin is considered implementation detail at the moment. But yes, we could add some docs.

@web-padawan web-padawan added the docs Something isn't documented label May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs Something isn't documented
Projects
None yet
Development

No branches or pull requests

2 participants