-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix: target specific window for window events #8826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, I believe all window events should use emit_filter
and target, EventTarget::Any
, EventTarget::Window
and EventTarget::WebviewWindow
Thanks for the feedback @amrbashir, I've changed the Or did you just mean to say that all events should use emit_filter? |
You're right, no need to target |
Ah, gotcha. So even if there is no matching |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
When using the onCloseRequested JS Api, the event was triggered even when closing other windows, not just the one of interest.
I believe it would be more logical for this event to be dispatched exclusively for the current window's close requests.
Before:
before.mp4
After:
after.mp4