Prevent click event to propogate to elements behind the clicked element

2 posts, 0 answers
  1. Idan
    Idan avatar
    76 posts
    Member since:
    Oct 2012

    Posted 09 Jan 2014 Link to this post

    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?

  2. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 10 Jan 2014 Link to this post

    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?
Back to Top