Skip to content

Commit

Permalink
fix: Dropdown でメニュー表示状態で Tab でメニュー外に遷移したらTriggerに遷移するように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
atzzCokeK committed Sep 7, 2024
1 parent eb3b2c0 commit 93543ad
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,8 @@ export function useKeyboardNavigation(
trigger.focus()
} else if (!e.shiftKey && e.target === lastTabbable) {
// move focus next of the Trigger
const rootTriggers = tabbable(rootTriggerRef.current)
const rootTrigger = rootTriggers[rootTriggers.length - 1]
if (rootTrigger) {
rootTrigger.focus()
}
e.preventDefault()
trigger.focus() // Triggerにフォーカスを移動
}
} else if (e.key === 'Escape' || e.key === 'Esc') {
if (triggerElementRef.current) {
Expand Down

0 comments on commit 93543ad

Please sign in to comment.