mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(ionList): do not let option button click propagate to item
Addresses #1202
This commit is contained in:
2
js/angular/directive/itemOptionButton.js
vendored
2
js/angular/directive/itemOptionButton.js
vendored
@@ -41,6 +41,8 @@ return {
|
||||
itemCtrl.$element.append(itemCtrl.optionsContainer);
|
||||
}
|
||||
itemCtrl.optionsContainer.append($element);
|
||||
|
||||
$element.on('click', eventStopPropagation);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
8
js/angular/directive/ngClick.js
vendored
8
js/angular/directive/ngClick.js
vendored
@@ -34,13 +34,13 @@ IonicModule
|
||||
}])
|
||||
|
||||
.directive('ionStopEvent', function () {
|
||||
function stopEvent(e) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attr) {
|
||||
element.bind(attr.ionStopEvent, stopEvent);
|
||||
element.bind(attr.ionStopEvent, eventStopPropagation);
|
||||
}
|
||||
};
|
||||
});
|
||||
function eventStopPropagation(e) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user