Skip to content

Commit

Permalink
Fix reported right-click crash (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeblevins authored Apr 12, 2020
1 parent 60693ca commit 234a852
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,12 @@ public async void CheckPathInput(ItemViewModel instance, string CurrentInput)

private void VisiblePath_LostFocus(object sender, RoutedEventArgs e)
{
if (FocusManager.GetFocusedElement() is FlyoutBase || FocusManager.GetFocusedElement() is AppBarButton) { return; }
if (FocusManager.GetFocusedElement() is FlyoutBase || FocusManager.GetFocusedElement() is AppBarButton || FocusManager.GetFocusedElement() is Popup) { return; }

var element = FocusManager.GetFocusedElement() as Control;
if (element.FocusState != FocusState.Programmatic && element.FocusState != FocusState.Keyboard)
var element = FocusManager.GetFocusedElement();
var elementAsControl = element as Control;

if (elementAsControl.FocusState != FocusState.Programmatic && elementAsControl.FocusState != FocusState.Keyboard)
{
App.CurrentInstance.NavigationToolbar.IsEditModeEnabled = false;
}
Expand Down

0 comments on commit 234a852

Please sign in to comment.