6

IE support for stopPropagation() is lacking, and requires workarounds, but I can't tell if the same thing is true for stopImmediatePropagation()- is it safe for all browsers, or does it requires its own set of workarounds?

Community
  • 1
  • 1
Yarin
  • 173,523
  • 149
  • 402
  • 512
  • If you use jQuery and not plain JavaScript it should work fine in IE too. – j08691 Jun 05 '12 at 14:48
  • By the way, stopImmediatePropagation seems to have poor support within some mobile browsers, mainly Android Firefox, iOS Chrome and iOS Safari. – Rui Marques Dec 11 '13 at 10:26

2 Answers2

17

I was wondering for the browser support of JavaScript's event.stopImmediatePropagation as well, so I decided to test it by checking whether the following method exists:

Event.prototype.stopImmediatePropagation

It's supported on the following desktop browsers:

  • Internet Explorer 9+
  • Firefox 10+
  • Chrome 6+
  • Safari 5.0+
  • Opera 15+ (Presto doesn't support stopImmediatePropagation)
Rob W
  • 341,306
  • 83
  • 791
  • 678
2

The stopPropagation mentioned on the other answer is related to the method natively available on browser for the event object , while the stopPropagation() method of jQuery works fine in all browser (since it's a wrapper for the same task, taking into account the browser capabilities in which this method is run)

Fabrizio Calderan
  • 120,726
  • 26
  • 164
  • 177
  • 10
    This answer does not mention stopImmediatePropagation, which is the subject of the question. – Paul Lynch Nov 26 '13 at 19:57
  • the answer is based on a wrong assumption that made OP ask about stopImmediatePropagation: he asked about it because of a wrong assumption on stopPropagation – Fabrizio Calderan Nov 27 '13 at 08:23