maui icon indicating copy to clipboard operation
maui copied to clipboard

Button does not behave properly when pointer hovers over the button because it's in focused state

Open MartyIX opened this issue 1 year ago • 2 comments

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

  1. Run the application
    • Yellow means "in the 'normal' state"
    • Green means "in the 'focused' state"
    • Blue means "in the 'PointerOver' state"
  2. when my pointer is not over any of the two buttons: image
  3. when my pointer is over the bottom button: image
  4. when my pointer is over the upper button (my issue): image

-> 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

MartyIX avatar Jan 08 '24 13:01 MartyIX

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.

ghost avatar Jan 08 '24 15:01 ghost

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.

MartyIX avatar Jan 09 '24 08:01 MartyIX