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

In 0.13 and 0.13.1, mouse_area doesn't activate on_move message #2589

Open
4 tasks done
pixelprizm opened this issue Sep 20, 2024 · 0 comments
Open
4 tasks done

In 0.13 and 0.13.1, mouse_area doesn't activate on_move message #2589

pixelprizm opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pixelprizm
Copy link

Is your issue REALLY a bug?

  • My issue is indeed a bug!
  • I am not crazy! I will not fill out this form just to ask a question or request a feature. Pinky promise.

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

The mouse_area element with on_move seems to be broken in 0.13 and 0.13.1. It worked in 0.12.

The following code dispatches the OnMove message in 0.12 but not in 0.13.

mouse_area("Hello world").on_move(Message::OnMove),

on_press still works.

It looks related to the change made here: c711750#diff-2b3d8bbc11ac699d4e936dac3b987950f3d1a63b5345395c14541a1021322e14R322.

From some brief debugging, the mouse move does not activate the following if-condition: if state.cursor_position != cursor_position && state.bounds != bounds {.

What is the expected behavior?

I'm expecting the mouse_area element to dispatch an OnMove message when I move the cursor over that mouse area element, but it doesn't since 0.13.

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

@pixelprizm pixelprizm added the bug Something isn't working label Sep 20, 2024
@pixelprizm pixelprizm changed the title mouse_area doesn't activate on_move message In 0.13, mouse_area doesn't activate on_move message Sep 20, 2024
@pixelprizm pixelprizm changed the title In 0.13, mouse_area doesn't activate on_move message In 0.13 and 0.13.1, mouse_area doesn't activate on_move message Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant