Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5e96797

Browse files
committed
Req2
1 parent 7e1e805 commit 5e96797

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

‎src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.Events.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ namespace Files.App.Controls
88
{
99
public partial class BreadcrumbBarItem
1010
{
11-
private void ItemContentButton_Click(object sender, RoutedEventArgs e)
12-
{
13-
//OnItemClicked();
14-
}
15-
1611
private void ItemChevronButton_Click(object sender, RoutedEventArgs e)
1712
{
1813
FlyoutBase.ShowAttachedFlyout(_itemChevronButton);

‎src/Files.App.Controls/BreadcrumbBar/BreadcrumbBarItem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ protected override void OnApplyTemplate()
4949
if (IsEllipsis || IsLastItem)
5050
VisualStateManager.GoToState(this, "ChevronCollapsed", true);
5151

52-
_itemContentButton.AddHandler( // Bypass IsHandled = true in the base class
52+
// Handle click event with PointerReleasedEvent to get PointerPoint
53+
_itemContentButton.AddHandler( // Bypass "IsHandled = true" done in the base class
5354
PointerReleasedEvent,
5455
new PointerEventHandler((s, e) =>
5556
{
@@ -58,7 +59,6 @@ protected override void OnApplyTemplate()
5859
}),
5960
handledEventsToo: true);
6061

61-
_itemContentButton.Click += ItemContentButton_Click;
6262
_itemContentButton.PreviewKeyDown += ItemContentButton_PreviewKeyDown;
6363
_itemChevronButton.Click += ItemChevronButton_Click;
6464
_itemChevronButton.PreviewKeyDown += ItemChevronButton_PreviewKeyDown;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ private async void BreadcrumbBar_ItemClicked(Controls.BreadcrumbBar sender, Cont
279279
ViewModel.PathComponents[args.Index].Path is not { } path)
280280
return;
281281

282-
var pointerUpdateKind = args.PointerRoutedEventArgs.GetCurrentPoint(null).Properties.PointerUpdateKind;
283-
await ViewModel.HandleFolderNavigationAsync(path, pointerUpdateKind is PointerUpdateKind.MiddleButtonReleased);
282+
// If user clicked the item with middle mouse button, open it in new tab
283+
var openInNewTab = args.PointerRoutedEventArgs?.GetCurrentPoint(null).Properties.PointerUpdateKind is PointerUpdateKind.MiddleButtonReleased;
284+
285+
await ViewModel.HandleFolderNavigationAsync(path, openInNewTab);
284286
}
285287

286288
private async void BreadcrumbBar_ItemDropDownFlyoutOpening(object sender, BreadcrumbBarItemDropDownFlyoutEventArgs e)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /