ghcjs / jsaddle

JavaScript interface that works with GHCJS or GHC
116 stars 62 forks source link

jsaddle-warp: stopPropagation sometimes doesn't work #101

Open tomsmalley opened 4 years ago

tomsmalley commented 4 years ago

https://github.com/ghcjs/jsaddle/commit/e6ba1fc06e455d4060f1b82db751c7d0fa2bb2e9

This commit introduced some odd behaviour for macbooks: for us, closing a modal when an input was focused/blurred. Seems like stopPropagation is not being respected, or something - but the strange thing is it only happens when using tap to click, but not when using a mechanical click.

tomsmalley commented 4 years ago

My suspicions of this were misplaced, actually something was broken in application code which meant this jsaddle commit altered the behaviour when it shouldn't have.

tomsmalley commented 4 years ago

Actually I was wrong, it's just hard to reproduce :)

There appears to be a race condition which means clicks can slip through before the stopPropagation is processed. Mostly happens when under heavy network load.

This also isn't mac specific, but at one point I could repro it 100% of the time with tap to click. Must be a difference with how Safari processes click events.