Button does not behave properly when pointer hovers over the button because it's in focused state
Description
Pointer hover does not set proper style for the button in the focused state (the first one here). I expect PointerOver style to be set but it is styled using Focused style.
See complete XAML here.
Steps to Reproduce
- Run the application
- Yellow means "in the 'normal' state"
- Green means "in the 'focused' state"
- Blue means "in the 'PointerOver' state"
- when my pointer is not over any of the two buttons:
- when my pointer is over the bottom button:
- when my pointer is over the upper button (my issue):
-> The reason why it doesn't seem to be that the first button is in "focused" state and it does not react to "pointer hover" event. I'm not sure if this is intended or not intended behavior.
Link to public reproduction project repository
https://github.com/MartyIX/MauiRepro202401BtnPointerOver
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Windows
Did you find any workaround?
No.
Relevant log output
No response
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
I modified the description of the bug because the cause is different than I thought. Basically, it's about the first button being in "focused" state. If one switch the following lines https://github.com/MartyIX/MauiRepro202401BtnPointerOver/blob/e8d4c6a1145ca892502a9e48ec11ec0ba2015e14/MainPage.xaml#L11-L12 then again the first button behaves "unexpectedly". So this issue has nothing to do with Command attribute.