wicg-focus-ring
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -302,3 +302,3 @@ (function (global, factory) { | ||
function onWindowBlur() { | ||
if (document.activeElement.classList.contains('focus-ring')) { | ||
if (index(document.activeElement).contains('focus-ring')) { | ||
// Keep a reference to the element to which the focus-ring class is applied | ||
@@ -317,3 +317,3 @@ // so the focus-ring class can be restored to it if the window regains | ||
document.body.classList.add('js-focus-ring'); | ||
index(document.body).add('js-focus-ring'); | ||
} | ||
@@ -320,0 +320,0 @@ |
{ | ||
"name": "wicg-focus-ring", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Polyfill for :focus-ring pseudo-selector", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -132,3 +132,3 @@ import classList from 'dom-classlist'; | ||
function onWindowBlur() { | ||
if (document.activeElement.classList.contains('focus-ring')) { | ||
if (classList(document.activeElement).contains('focus-ring')) { | ||
// Keep a reference to the element to which the focus-ring class is applied | ||
@@ -147,3 +147,3 @@ // so the focus-ring class can be restored to it if the window regains | ||
document.body.classList.add('js-focus-ring'); | ||
classList(document.body).add('js-focus-ring'); | ||
} | ||
@@ -150,0 +150,0 @@ |
85906