diff --git a/lib/timeline/component/item/Item.js b/lib/timeline/component/item/Item.js index b7bf7941..d1819498 100644 --- a/lib/timeline/component/item/Item.js +++ b/lib/timeline/component/item/Item.js @@ -137,16 +137,12 @@ Item.prototype._repaintDeleteButton = function (anchor) { deleteButton.className = 'delete'; deleteButton.title = 'Delete this item'; - // TODO: neatly handle button click + // TODO: be able to destroy the delete button new Hammer(deleteButton).on('tap', function (event) { me.parent.removeFromDataSet(me); - event.srcEvent.stopPropagation(); // TODO: stopPropagation seems not to work + event.stopPropagation(); + event.preventDefault(); }); - //deleteButton.addEventListener('click', function (event) { - // me.parent.removeFromDataSet(me); - // event.stopPropagation(); - // event.preventDefault(); - //}); anchor.appendChild(deleteButton); this.dom.deleteButton = deleteButton;