Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

event.stopImmediatePropagation() does not work on Chrome for Android

Tags:

jquery

android

I believe event.stopImmediatePropagation() does not work on Chrome for Android. Would anyone have a fix for it ? (alternative code) ? Thanks.

like image 698
davidbayonchen Avatar asked Jul 01 '12 01:07

davidbayonchen


People also ask

What does event stopImmediatePropagation () do?

stopImmediatePropagation() The stopImmediatePropagation() method of the Event interface prevents other listeners of the same event from being called. If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.

When should you use stopImmediatePropagation () instead of stopPropagation ()?

Show activity on this post. So the difference here is that since the div is the parent of the button that got clicked, stopPropagation() makes sure that 3 is never alerted, whereas stopImmediatePropagation() makes sure that not even other event listeners registered on the button itself, i.e. 2 , are executed.

What is stopImmediatePropagation in jquery?

stopImmediatePropagation() method stops the rest of the event handlers from being executed. This method also stops the event from bubbling up the DOM tree.

What is the use of stopPropagation and stopImmediatePropagation methods?

stopPropagation allows other event handlers on the same element to be executed, while stopImmediatePropagation prevents this. stopPropagation and stopImmediatePropagation prevents event handlers later in the capturing and bubbling phases from being executed.


1 Answers

Try

event.callNonExistingMethode();

or

Do not use event.stopImmediatePropagation(); instead use only stopImmediatePropagation();

like image 184
prem30488 Avatar answered Oct 21 '22 03:10

prem30488