Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Touch device ghost click triggers on different element Reply To: Touch device ghost click triggers on different element

#252920
Shikkediel
Participant

I think the event.handled works in the script I posted because the event is provided by a delegated binding, so the event is propagating up the DOM tree, so the event.handled flag remains.

That is an interesting suggestion but I do not see how the code could ever set the variable to false. It starts as undefined and after the first event becomes true indefinitely. So the initial condition can never be fulfilled. Unless I’m missing something…

Edit – seems to always be undefined:

codepen.io/anon/pen/KWZeeg