fix(ionList): do not let option button click propagate to item

Addresses #1202
This commit is contained in:
Andy Joslin
2014-04-25 06:33:59 -06:00
parent 634b3971b1
commit a845ff3489
2 changed files with 6 additions and 4 deletions

View File

@@ -41,6 +41,8 @@ return {
itemCtrl.$element.append(itemCtrl.optionsContainer);
}
itemCtrl.optionsContainer.append($element);
$element.on('click', eventStopPropagation);
};
}
};

View File

@@ -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();
}