Skip to content

Commit 2053111

Browse files
author
Adam Bradley
committed
fix toggle for android
1 parent 00f6b17 commit 2053111

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

dist/js/ionic-angular.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -2590,16 +2590,22 @@ angular.module('ionic.ui.touch', [])
25902590

25912591
.directive('ngClick', ['$parse', function($parse) {
25922592

2593+
function onTap(e) {
2594+
// wire this up to Ionic's tap/click simulation
2595+
ionic.clickElement(e.target, e);
2596+
}
2597+
25932598
// Actual linking function.
25942599
return function(scope, element, attr) {
25952600

25962601
var clickHandler = $parse(attr.ngClick);
25972602

2598-
function onTap(e) {
2603+
element.on('click', function(event) {
25992604
scope.$apply(function() {
2600-
clickHandler(scope, {$event: (e)});
2601-
});
2602-
}
2605+
clickHandler(scope, {$event: (event)});
2606+
});
2607+
});
2608+
26032609
ionic.on('tap', onTap, element[0]);
26042610

26052611
// Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click

0 commit comments

Comments
 (0)