Skip to content

Conversation

@rhahne
Copy link

@rhahne rhahne commented Dec 18, 2020

Fixing the data-focus atribute
Currently the data-focus attribute does not work as described in your documentation.
The method, which assigns the corresponding target in the data-focus attribute is not correct. Therefore I fixed it in this PR.

Adding currentTarget var
Currently if an event gets provided to the moveFocusBox function the fallback was document.activeElement.
This does not respect the ability of applying the focusBox to another element than the one which is currently active.
Therefore I added the currentTarget variable which gets assigned after the data-focus / data-focus-label / data-focus-ignore exceptions in the onFocusHandler function. The variable will then be used in the moveFocusBox as a new fallback.

This will ensure that always the correct element will be focused when the moveFocusBox function is being called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant