Skip to content

Commit

Permalink
refactor(focus-visible): reset keyboardMode after focus
Browse files Browse the repository at this point in the history
  • Loading branch information
thetaPC committed Nov 26, 2024
1 parent f6188c4 commit aaebad5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/utils/focus-visible.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const FOCUS_KEYS = [
'ArrowUp',
'Home',
'End',
'Meta',
];

export interface FocusVisibleUtility {
Expand Down Expand Up @@ -54,6 +55,7 @@ export const startFocusVisible = (rootEl?: HTMLElement): FocusVisibleUtility =>
}) as Element[];
setFocus(toFocus);
}
keyboardMode = true;
};
const onFocusout = () => {
if (ref.activeElement === root) {
Expand Down

0 comments on commit aaebad5

Please sign in to comment.