diff --git a/src/helpers/scopeTab.js b/src/helpers/scopeTab.js index a8410ab3..b8516c4d 100644 --- a/src/helpers/scopeTab.js +++ b/src/helpers/scopeTab.js @@ -62,6 +62,10 @@ export default function scopeTab(node, event) { x += shiftKey ? -1 : 1; } + // If the tabbable element does not exist, + // let the browser control the focus + if (typeof tabbable[x] === "undefined") return; + event.preventDefault(); tabbable[x].focus();