Skip to content

Commit

Permalink
Fixed issue where tabbing wouldn't loop correctly for radio elements …
Browse files Browse the repository at this point in the history
…at the end of a modal
  • Loading branch information
loganscharen authored Mar 8, 2024
1 parent a275399 commit 35f7eb0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/helpers/scopeTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ export default function scopeTab(node, event) {
target = tail;
}

if (tail === activeElement && !shiftKey) {
if (
(tail === activeElement ||
(activeElement.type === "radio" &&
tail.type === "radio" &&
tail.name === activeElement.name)) &&
!shiftKey)
) {
target = head;
}

Expand Down

0 comments on commit 35f7eb0

Please sign in to comment.