Skip to content

Commit 0421596

Browse files
committed
fix(ionDeleteButton): stop clicks from bubbling up to main item
1 parent edb62c2 commit 0421596

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: js/angular/directive/itemDeleteButton.js

+8
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ var ITEM_TPL_DELETE_BUTTON =
3131
*/
3232
IonicModule
3333
.directive('ionDeleteButton', function() {
34+
35+
function stopPropagation(ev) {
36+
ev.stopPropagation();
37+
}
38+
3439
return {
3540
restrict: 'E',
3641
require: ['^^ionItem', '^?ionList'],
@@ -48,6 +53,9 @@ IonicModule
4853
container.append($element);
4954
itemCtrl.$element.append(container).addClass('item-left-editable');
5055

56+
//Don't bubble click up to main .item
57+
$element.on('click', stopPropagation);
58+
5159
init();
5260
$scope.$on('$ionic.reconnectScope', init);
5361
function init() {

0 commit comments

Comments
 (0)