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