Skip to content

Commit

Permalink
Only try to dismiss popup if next captured item is not a context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Aug 25, 2018
1 parent 863d1ea commit 1293440
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Fluent.Ribbon/Services/PopupService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,11 @@ public static void OnContextMenuClosing(object sender, ContextMenuEventArgs e)
{
Debug.WriteLine("Context menu closing");
control.IsContextMenuOpened = false;
RaiseDismissPopupEvent(control, DismissPopupMode.MouseNotOver);

if (Mouse.Captured is System.Windows.Controls.ContextMenu == false)
{
RaiseDismissPopupEvent(e.OriginalSource, DismissPopupMode.MouseNotOver);
}
}
}

Expand Down

0 comments on commit 1293440

Please sign in to comment.