diff --git a/src/focus-visible.js b/src/focus-visible.js index 83cd8c7..5f9426c 100644 --- a/src/focus-visible.js +++ b/src/focus-visible.js @@ -222,7 +222,7 @@ function init() { function onInitialPointerMove(e) { // Work around a Safari quirk that fires a mousemove on whenever the // window blurs, even if you're tabbing out of the page. ¯\_(ツ)_/¯ - if (e.target.nodeName.toLowerCase() === 'html') { + if (e.target.nodeName && e.target.nodeName.toLowerCase() === 'html') { return; }