aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ngMobile/directive/ngClick.js3
-rw-r--r--test/ngMobile/directive/ngClickSpec.js3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/ngMobile/directive/ngClick.js b/src/ngMobile/directive/ngClick.js
index 51e201c2..6df71ddb 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();
}
diff --git a/test/ngMobile/directive/ngClickSpec.js b/test/ngMobile/directive/ngClickSpec.js
index 9038514c..52394977 100644
--- a/test/ngMobile/directive/ngClickSpec.js
+++ b/test/ngMobile/directive/ngClickSpec.js
@@ -211,7 +211,10 @@ describe('ngClick (mobile)', function() {
expect($rootScope.count1).toBe(1);
time = 90;
+ // Verify that it is blured so we don't get soft-keyboard
+ element1[0].blur = jasmine.createSpy('blur');
browserTrigger(element1, 'click', [], 10, 10);
+ expect(element1[0].blur).toHaveBeenCalled();
expect($rootScope.count1).toBe(1);