Skip to content

Commit b77b6ff

Browse files
authored
Fix: Prevent Ctrl+C from overriding Text Block copy behavior (#17825)
1 parent 0bccda1 commit b77b6ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Files.App/Views/MainPage.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ private async Task OnPreviewKeyDownAsync(KeyRoutedEventArgs e)
235235
if (command.Code is CommandCodes.OpenItem && (source?.FindAscendantOrSelf<Omnibar>() is not null || source?.FindAscendantOrSelf<AppBarButton>() is not null))
236236
break;
237237

238+
// Prevent ctrl + c from overriding copy in textblocks
239+
if (currentModifiers == KeyModifiers.Ctrl && e.Key is VirtualKey.C && (FrameworkElement)FocusManager.GetFocusedElement(MainWindow.Instance.Content.XamlRoot) is TextBlock)
240+
break;
238241

239242
if (command.Code is not CommandCodes.None && keyReleased)
240243
{

0 commit comments

Comments
 (0)