Skip to content

Commit dde3ee7

Browse files
authored
Code Quality: Disable opening context menu on footer items (#16995)
1 parent b1d248c commit dde3ee7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Files.App.Controls/Sidebar/SidebarView.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
HorizontalAlignment="Stretch"
4949
VerticalAlignment="Stretch"
5050
Canvas.ZIndex="10"
51-
ContextRequested="PaneColumnGrid_ContextRequested"
5251
XYFocusKeyboardNavigation="Enabled">
5352
<Grid.RowDefinitions>
5453
<RowDefinition Height="*" />
@@ -63,6 +62,7 @@
6362
<ScrollViewer
6463
x:Name="MenuItemHostScrollViewer"
6564
Padding="0,8,0,0"
65+
ContextRequested="MenuItemHostScrollViewer_ContextRequested"
6666
HorizontalScrollMode="Disabled"
6767
VerticalScrollBarVisibility="Auto"
6868
XYFocusKeyboardNavigation="Enabled">

src/Files.App.Controls/Sidebar/SidebarView.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ private void SidebarResizer_ManipulationCompleted(object sender, ManipulationCom
228228
e.Handled = true;
229229
}
230230

231-
private void PaneColumnGrid_ContextRequested(UIElement sender, ContextRequestedEventArgs e)
231+
private void MenuItemHostScrollViewer_ContextRequested(UIElement sender, ContextRequestedEventArgs e)
232232
{
233233
var newArgs = new ItemContextInvokedArgs(null, e.TryGetPosition(this, out var point) ? point : default);
234234
ViewModel.HandleItemContextInvokedAsync(this, newArgs);

0 commit comments

Comments
 (0)