Skip to content

Commit

Permalink
Fixes #581 by making eager close protection less agressive
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Jul 3, 2018
1 parent ad5c70f commit c41103d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
- [#564](../../issues/564) - Gallery overflow panel (with menu items) doesn't close when clicking once in the application
- [#572](../../issues/572) - KeyTip.Keys Position
- [#573](../../issues/573) - Empty context menu on controls and ribbon
- [#581](../../issues/581) - StackOverflow Exception when trying to access ApplicationMenu while RibbonMenu is minimized

- ### Enhancements
- [#516](../../issues/516) - Add options to hide the row containing RibbonTabItems
Expand Down
8 changes: 7 additions & 1 deletion Fluent.Ribbon/Services/PopupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,14 @@ public static void OnDismissPopup(object sender, DismissPopupEventArgs e)
&& ribbonTabControl.IsMinimized
&& IsAncestorOf(control as DependencyObject, e.OriginalSource as DependencyObject))
{
Mouse.Capture(control as IInputElement, CaptureMode.SubTree);
// Don't prevent closing if the new target is an ApplicationMenu (#581)
if (Mouse.Captured is ApplicationMenu)
{
control.IsDropDownOpen = false;
return;
}

Mouse.Capture(control as IInputElement, CaptureMode.SubTree);
return;
}

Expand Down

0 comments on commit c41103d

Please sign in to comment.