Hi,
I believe we have discovered a bug in the Ribbon control.
Our application sets HwndSource.DefaultAcquireHwndFocusInMenuMode = false and uses the InputManager.IsInMenuMode property to deal with temporary changes of focus to the ribbon.
We have been experiencing an issue where after clicking a ribbon button rapidly and repeatedly, focus is not returned to the original control, and the IsInMenuMode property is true even after focus is moved out of the ribbon, and remains stuck at true thereafter.
I can reproduce this reliably in a simple application (which I'm happy to send to you). It appears that it is caused if the ribbon button that the user is clicking on becomes disabled while the button is pressed.
When this happens I would expect:
- Focus to return to the original control outside the ribbon
- IsInMenuMode to change to false
What I instead observe is:
- Focus moves from the ribbon button to the ribbon itself
- IsInMenuMode remains true (for the rest of the application's lifetime, as far as I can tell)
We are currently using v2019.1.687 but the issue is reproducible in v2021.1 as well.
Cheers,
Chris.