Skip to content
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

Resume propagation of events #2873

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

daxpedda
Copy link
Member

@daxpedda daxpedda commented Jun 11, 2023

I'm not entirely sure why stopPropagation() is being used, maybe because preventDefault() wasn't used back then. In any case, I don't think we want to prevent parents to receive events if they want to.

The call to cancelBubble doesn't do anything, it's a getter.

EDIT: See #2873 (comment), I decided to keep stopPropagation() for now.

@daxpedda daxpedda force-pushed the web-event-propagation branch from a09d4c9 to 6de189f Compare June 11, 2023 20:50
@daxpedda daxpedda force-pushed the web-event-propagation branch from 6de189f to 4b528f9 Compare June 11, 2023 22:36
@daxpedda
Copy link
Member Author

It's also blocking DeviceEvents from working correctly, you stop receiving them when the events are triggered in the canvas. See #2871.

I actually had to fix it in a different way. The web backend can't send events from multiple handlers at the same time, it has to restart the event loop every time. So I'm trying as much as possible to coalesce as many events as possible.

So for now stopPropagation() is actually helping #2871, otherwise I would have to check if the mouse is over the canvas or not (which shouldn't be too hard). We can eventually remove it when somebody actually complains.

@daxpedda daxpedda merged commit fc046ad into rust-windowing:master Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant