Skip to content

Commit

Permalink
IE11: ensure target.nodeName exists (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebuilder authored and robdodson committed Jun 4, 2019
1 parent cde50e5 commit 7ca7f9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/focus-visible.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function init() {
function onInitialPointerMove(e) {
// Work around a Safari quirk that fires a mousemove on <html> 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;
}

Expand Down

0 comments on commit 7ca7f9c

Please sign in to comment.