From e9099cb50b91fae325d519112f81042a85d123d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lau=C3=9Fmann?= Date: Mon, 17 Jun 2013 16:58:13 +0200 Subject: [PATCH] prevents unwanted opening of the soft keyboard Ghost clicks are busted but the corresponding form elements are still focused. This means that for example on smartphones the soft keyboard will be opened. This pull request prevents the unwanted opening of the soft keyboard. --- src/ngMobile/directive/ngClick.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ngMobile/directive/ngClick.js b/src/ngMobile/directive/ngClick.js index a6f6ed19dd3f..0bf3cac57636 100644 --- a/src/ngMobile/directive/ngClick.js +++ b/src/ngMobile/directive/ngClick.js @@ -135,6 +135,9 @@ ngMobile.directive('ngClick', ['$parse', '$timeout', '$rootElement', // If we didn't find an allowable region, bust the click. event.stopPropagation(); event.preventDefault(); + + // Blur focused form elements + event.target && event.target.blur(); }