Reputation: 732
I have two views - ItemView and CardView -
In card view, I trigger a global event of ItemView as -
self.eventBus.trigger('dragEvent', {
toId: moveToId,
fromId: moveFromId,
id: itemId,
e: event
});
This event trigger is handled by 'onDragEvent' function in ItemView as-
onDragEvent: function(options) {
...
}
The dragEvent is bubbling up. How do I avoid it?
Upvotes: 1
Views: 234
Reputation: 387
@muistooshort may be correct when it comes to triggering an Event
module like that. However, you can stop a View
event from bubbling with event.stopImmediatePropagation();
Upvotes: 1