From f5de2371531554f9fcf5896b9c4cd2da028bc87a Mon Sep 17 00:00:00 2001 From: Niki Sehmi Date: Fri, 22 Feb 2019 13:30:41 +0000 Subject: [PATCH] Add guard for document.activeElement.blur error --- lib/fastclick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fastclick.js b/lib/fastclick.js index 225ff660..ad76ea5c 100644 --- a/lib/fastclick.js +++ b/lib/fastclick.js @@ -295,7 +295,7 @@ var clickEvent, touch; // On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24) - if (document.activeElement && document.activeElement !== targetElement) { + if (document.activeElement && document.activeElement.blur && document.activeElement !== targetElement) { document.activeElement.blur(); }