Skip to content

Commit a845ff3

Browse files
committed
fix(ionList): do not let option button click propagate to item
Addresses #1202
1 parent 634b397 commit a845ff3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

js/angular/directive/itemOptionButton.js

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ return {
4141
itemCtrl.$element.append(itemCtrl.optionsContainer);
4242
}
4343
itemCtrl.optionsContainer.append($element);
44+
45+
$element.on('click', eventStopPropagation);
4446
};
4547
}
4648
};

js/angular/directive/ngClick.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ IonicModule
3434
}])
3535

3636
.directive('ionStopEvent', function () {
37-
function stopEvent(e) {
38-
e.stopPropagation();
39-
}
4037
return {
4138
restrict: 'A',
4239
link: function (scope, element, attr) {
43-
element.bind(attr.ionStopEvent, stopEvent);
40+
element.bind(attr.ionStopEvent, eventStopPropagation);
4441
}
4542
};
4643
});
44+
function eventStopPropagation(e) {
45+
e.stopPropagation();
46+
}

0 commit comments

Comments
 (0)