Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus #10

Merged
merged 7 commits into from
Jun 3, 2020
Merged

Focus #10

merged 7 commits into from
Jun 3, 2020

Conversation

idoros
Copy link
Owner

@idoros idoros commented May 28, 2020

This PR adds focus handling to layers.

  • redirect focus between layers on [Tab] / [Shift+Tab]
  • focus trap inside a layer with inert background
  • return focus to last focused element when layer is back on top

Leftovers:

idoros added 2 commits May 28, 2020 14:06
- new watchFocus(layerWrapper) to manipulate tabbing
- use watchFocus() to handle tabbing
- unique id to layers and data attr with the id to the layer origin
- renamed all layers to <zeejs-layer>
- renamed layer origin nodes to <zeejs-origin>
@idoros idoros added the feature New feature or request label May 28, 2020
idoros added 5 commits May 31, 2020 11:14
- focus trap between layers above blocking backdrop
- catch focus under inert and pass to first focusable element
- inert attribute to layers under blocking layer
- set the correct layers+backdrop in DOM with order and focus inmind
- new createRoot(): DOMLayer to contain all browser specific config
- handle re-focus in the updateLayers process
- changed layer id to be an actual id instead of data-id
- refactor react root to use createRoot from browser package
-removed unnecessary setWrapper() in createRoot() - @zeejs/browser
- new option for async focus change in update layers
- fix React implementation to async update focus during render
@idoros idoros merged commit 7b70d2f into master Jun 3, 2020
@idoros idoros deleted the ido/focus branch June 3, 2020 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant