add stop propagation to element code example Example: stop immediate propagation event.stopImmediatePropagation();