Skip to content

Commit

Permalink
fix(ionList): do not let option button click propagate to item
Browse files Browse the repository at this point in the history
Addresses #1202
  • Loading branch information
ajoslin committed Apr 25, 2014
1 parent 634b397 commit a845ff3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions js/angular/directive/itemOptionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ return {
itemCtrl.$element.append(itemCtrl.optionsContainer);
}
itemCtrl.optionsContainer.append($element);

$element.on('click', eventStopPropagation);
};
}
};
Expand Down
8 changes: 4 additions & 4 deletions js/angular/directive/ngClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

0 comments on commit a845ff3

Please sign in to comment.