This is a migrated thread and some comments may be shown as answers.

Prevent click event to propogate to elements behind the clicked element

1 Answer 65 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Idan
Top achievements
Rank 1
Idan asked on 09 Jan 2014, 09:05 AM
When I click some elements on the UI that have other elements behind them, the click event propogates to the ones below it. Is there an option in Icenium for the click event not to propogate and only respond to the click event of the top element.

I know that javascript has  event.stopPropagation() -- should I use it or there is another solution?

Thanks

1 Answer, 1 is accepted

Sort by
0
Jan-Dirk
Top achievements
Rank 1
answered on 10 Jan 2014, 11:49 AM
I didn't know about a event.stopPropogation. Did you try it and if so, does it work?

If you know (or can find out) that there is an element above the propogated element, then you can do an e.preventDefault() on that element?
Tags
General Discussion
Asked by
Idan
Top achievements
Rank 1
Answers by
Jan-Dirk
Top achievements
Rank 1
Share this question
or