-
Notifications
You must be signed in to change notification settings - Fork 892
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
Bug: Right Mouse Button Release event never gets sent #2608
Comments
To get a minimum reproducing example, just edit the following lines in the // old, line 78
//log::debug("{:?}", event);
// new
if matches!(event, Event::WindowEvent {
event: WindowEvent::MouseInput { .. },
..
}) {
log::debug("{:?}", event);
} Then just run the example as described in the general
I recorded some testing footage. It contains the following two scenarios:
Additional IMPORTANT notes:
|
It seems like the reason could be related to the order some events are fired. Here is some further analysis: If we press the button just slightly, we get the following order of events (oldest events are on the bottom): It seems like entering the context menu with the cursor counts as a If we keep the right mouse button pressed on the other hand, the cursor has time to leave the window as can be seen in the next screenshot Since we aren't in the window with the cursor any longer, the release event doesn't get fired (the one in the screenshot was fired after an additional click on the window again) |
It seems very weird to me that the I would be happy to work on a PR for this issue with some rough guidance. If anyone has some general pointers where to look for a fix I would be very happy. I'm currently out of ideas and I don't know |
Sorry, we don't have a web maintainer atm., so I can't really point you to someone that can help. Though if you end up with a PR that fixes it, I can merge it at some point. |
I can't reproduce this anymore, probably because of #2662. |
I just tried it out and it is still kind of reproducible. The left mouse button still seems to be stuck when opening the context menu. On the bright side, its state gets reset if the user presses the left mouse button again. So I would consider this as fixed aswell and it's all good from my side! Thanks for the ping! |
The context menu shouldn't open anymore. Are you using |
Oh I probably have to wait until the changes are used downstream. I'm happy in any way, but will give feedback once it's changed downstream 👍🏼 |
Would be really nice if you could try the current version on master, so the next version is actually fixed. [patch.crates-io]
winit = { git = "https://github.com/rust-windowing/winit" } See the Cargo Book for more information on this. |
A while ago, we discovered some weird behavior with the bevy engine when compiling to wasm.
When opening the context menu in the browser, things behaved weirdly after that. I opened an issue on the bevy UI library we are using (link above). After some analysis it turned out that the mouse state got stuck since we don't receive a
released
event when pressing the right mouse button. This in turn blocks the user from using the wasm app at all since inputs are all screwed up.This issue might be slightly related to #2455 and #2475 but it still seemed distinct enough to open a new issue.
I'll try to get a minimal reproducible example running in the near future which only utilizes
winit
.The text was updated successfully, but these errors were encountered: