We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently the arrow key navigation is broken if vuetify is running in shadow dom.
Instead of using document in the src/util/helpers.ts:435-464
document
src/util/helpers.ts:435-464
export function getNextElement(elements, location, condition) { let _el; let idx = elements.indexOf(document.activeElement); const inc = location === 'next' ? 1 : -1; do { idx += inc; _el = elements[idx]; } while ((!_el || _el.offsetParent == null || !(condition?.(_el) ?? true)) && idx < elements.length && idx >= 0); return _el; } export function focusChild(el, location) { const focusable = focusableChildren(el); if (!location) { if (el === document.activeElement || !el.contains(document.activeElement)) { focusable[0]?.focus(); } } else if (location === 'first') { focusable[0]?.focus(); } else if (location === 'last') { focusable.at(-1)?.focus(); } else if (typeof location === 'number') { focusable[location]?.focus(); } else { const _el = getNextElement(focusable, location); if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last'); } }
the active element could be looked up on a more generic scope:
scope
const scope = el.getRootNode(); ... let idx = elements.indexOf(scope.activeElement);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Problem to solve
Currently the arrow key navigation is broken if vuetify is running in shadow dom.
Proposed solution
Instead of using
document
in thesrc/util/helpers.ts:435-464
the active element could be looked up on a more generic
scope
:The text was updated successfully, but these errors were encountered: