Skip to content

Commit 11e2f0b

Browse files
committed
Revert to path mode on lost focus
1 parent 640fb76 commit 11e2f0b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/Files.App/UserControls/NavigationToolbar.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@
324324
CurrentSelectedMode="{x:Bind ViewModel.OmnibarCurrentSelectedMode, Mode=TwoWay}"
325325
CurrentSelectedModeName="{x:Bind ViewModel.OmnibarCurrentSelectedModeName, Mode=TwoWay}"
326326
IsFocused="{x:Bind ViewModel.IsOmnibarFocused, Mode=TwoWay}"
327+
LostFocus="Omnibar_LostFocus"
327328
QuerySubmitted="Omnibar_QuerySubmitted"
328329
TextChanged="Omnibar_TextChanged">
329330

@@ -358,7 +359,7 @@
358359
AutomationProperties.AccessibilityView="Content"
359360
AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"
360361
ChevronToolTip="{helpers:ResourceString Name=BreadcrumbBarChevronButtonToolTip}"
361-
Content="{x:Bind Title, Mode=OneWay}"/>
362+
Content="{x:Bind Title, Mode=OneWay}" />
362363
</DataTemplate>
363364
</controls:BreadcrumbBar.ItemTemplate>
364365
</controls:BreadcrumbBar>

src/Files.App/UserControls/NavigationToolbar.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,5 +420,14 @@ private void BreadcrumbBar_ItemDropDownFlyoutClosed(object sender, BreadcrumbBar
420420
// Clear the flyout items to save memory
421421
e.Flyout.Items.Clear();
422422
}
423+
424+
private void Omnibar_LostFocus(object sender, RoutedEventArgs e)
425+
{
426+
if (ViewModel.OmnibarCurrentSelectedMode == OmnibarCommandPaletteMode)
427+
{
428+
ViewModel.OmnibarCurrentSelectedMode = OmnibarPathMode;
429+
ViewModel.OmnibarCommandPaletteModeText = string.Empty;
430+
}
431+
}
423432
}
424433
}

0 commit comments

Comments
 (0)