From 8cd5b677f0cb0494d2d2a8637e9f8315501dfef5 Mon Sep 17 00:00:00 2001 From: Navneet Kambo <72474613+nakambo@users.noreply.github.com> Date: Tue, 8 Oct 2024 23:23:54 -0400 Subject: [PATCH] Multi line text view key handling: add check for first responder (#2215) --- .../Libraries/Text/TextInput/Multiline/RCTUITextView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm b/packages/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm index ef17a793e55cb6..679d8c423eb831 100644 --- a/packages/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm +++ b/packages/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.mm @@ -587,7 +587,7 @@ - (void)deleteBackward { } #else // [macOS - (BOOL)performKeyEquivalent:(NSEvent *)event { - if (!self.hasMarkedText && ![self.textInputDelegate textInputShouldHandleKeyEvent:event]) { + if (self.window.firstResponder == self && !self.hasMarkedText && ![self.textInputDelegate textInputShouldHandleKeyEvent:event]) { return YES; }