-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Event handler removed after callback fails #1573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What's happening here is the In other areas, Svelte has taken the position that not having unhandled exceptions is the developer's responsibility. There's also the question of what to do with other handlers that would have been called after the one that threw the exception. We don't want to just silently swallow the exception. I guess my proposal of how to deal with this situation is; If a handler throws an exception, make sure we set |
Agreed, this seems the way native events work too. |
* in .fire always set calling flag back to false (#1573) * update expected bundles
Fixed in 2.9.3 - thanks! |
Cool, thank you :) |
Hello,
I found what I think is a bug.
I listen to windows keyup events in a child component, so I can add and remove this component in a #if block (because my component is kind of a lightbox slideshow so most of the time it is not visible, so I want the event listeners to be removed).
In the parent component, I listen to the events fired by the child and handle them with a method.
What I found is that if the method throws an exception, the event handler of the parent will not be called anymore, but the child one still will be.
Here is an REPL demo.
Steps to reproduce :
I have a repository too.
thank you
The text was updated successfully, but these errors were encountered: