Ribbon gets stuck in MenuMode when button is disabled

Ribbon for WPF Forum

Posted 3 years ago by Chris White
Version: 19.1.0687
Platform: .NET 4.7
Environment: Windows 10 (64-bit)


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.



Comments (1)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Chris,

Since you said you already have a sample project that reproduces this, could you please ZIP and send that sample to "support@actiprosoftware.com" and copy your original forum message in the email? That will open a support ticket we can use to track this issue going forward. When zipping the sample project, please be sure to exclude the "obj" and "bin" folders from the ZIP as having those present will typically result in the attachment being rejected by our mail system.

Actipro Software Support

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.