Skip to content

Commit 86632aa

Browse files
Gary Hemstockdiasbruno
Gary Hemstock
authored andcommitted
[fixed] check if element exists before focusing in scopeTab helper
1 parent 2a70831 commit 86632aa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/helpers/scopeTab.js

+4
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ export default function scopeTab(node, event) {
6262
x += shiftKey ? -1 : 1;
6363
}
6464

65+
// If the tabbable element does not exist,
66+
// let the browser control the focus
67+
if (typeof tabbable[x] === "undefined") return;
68+
6569
event.preventDefault();
6670

6771
tabbable[x].focus();

0 commit comments

Comments
 (0)