From 93d777aa64d8810759554e367a4a0d10e7f9d93d Mon Sep 17 00:00:00 2001 From: Vincent Ricard Date: Fri, 6 Nov 2015 22:37:52 +0100 Subject: [PATCH] Fix TypeError: tapElement.blur is not a function --- src/ngTouch/directive/ngClick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngTouch/directive/ngClick.js b/src/ngTouch/directive/ngClick.js index f352c252f443..58b3c3ef5b27 100644 --- a/src/ngTouch/directive/ngClick.js +++ b/src/ngTouch/directive/ngClick.js @@ -255,7 +255,7 @@ ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement', // Blur the focused element (the button, probably) before firing the callback. // This doesn't work perfectly on Android Chrome, but seems to work elsewhere. // I couldn't get anything to work reliably on Android Chrome. - if (tapElement) { + if (tapElement && angular.isFunction(tapElement.blur)) { tapElement.blur(); }