@alpinejs/focus
Configurable displayCheck
setting
#4390
joshuapease
started this conversation in
3. Feature Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've run into some issues building a disclosure navigation and using the focus plugin.
Child menu items are hidden using
x-show
(making themdisplay: none
).When I use
@keydown.down="$focus.wrap().next()"
and@keydown.up="$focus.wrap().previous()"
focus halts when the next focusable element is hidden.My best guess is that tabbable is finding the hidden element, but is unable to focus on it since it's hidden.
If I manually modify the plugin to use
displayCheck: 'full'
I get the behavior I'd expect.Here's the spot I would modify.
alpine/packages/focus/src/index.js
Lines 36 to 40 in ab743bc
It seems like other folks have encountered this too:
Beta Was this translation helpful? Give feedback.
All reactions