From b1d4545418930212af598de1f8106f5a12555db5 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Wed, 26 Jan 2022 18:31:50 -0600 Subject: [PATCH] =?UTF-8?q?[0.66]=20Don't=20override=20key=20presses=20"Sp?= =?UTF-8?q?ace"/"Enter"=20to=20perform=20onClick=20in=20RCTV=E2=80=A6=20(#?= =?UTF-8?q?972)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Don't override key presses "Space"/"Enter" to perform onClick in RCTView (#941) * add pull yml * match handleOpenURLNotification event payload with iOS (#755) (#2) Co-authored-by: Ryan Linton * [pull] master from microsoft:master (#11) * Deprecated api (#853) * Remove deprecated/unused context param * Update a few Mac deprecated APIs * Packing RN dependencies, hermes and ignoring javadoc failure, (#852) * Ignore javadoc failure * Bringing few more changes from 0.63-stable * Fixing a patch in engine selection * Fixing a patch in nuget spec * Fixing the output directory of nuget pack * Packaging dependencies in the nuget * Fix onMouseEnter/onMouseLeave callbacks not firing on Pressable (#855) * add pull yml * match handleOpenURLNotification event payload with iOS (#755) (#2) Co-authored-by: Ryan Linton * fix mouse evetns on pressable * delete extra yml from this branch * Add macOS tags * reorder props to have onMouseEnter/onMouseLeave always be before onPress Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton * Grammar fixes. (#856) Updates simple grammar issues. Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com> Co-authored-by: Anandraj Co-authored-by: Saad Najmi Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton Co-authored-by: Muhammad Hamza Zaman * remove performKeyEquivalent Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com> Co-authored-by: Anandraj Co-authored-by: Muhammad Hamza Zaman * fix integration check Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com> Co-authored-by: Ryan Linton Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com> Co-authored-by: Anandraj Co-authored-by: Muhammad Hamza Zaman --- React/Views/RCTView.m | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/React/Views/RCTView.m b/React/Views/RCTView.m index 45463cde073b49..9a3a41a5f7513d 100644 --- a/React/Views/RCTView.m +++ b/React/Views/RCTView.m @@ -1393,19 +1393,6 @@ - (BOOL)acceptsFirstResponder return ([self focusable] && [NSApp isFullKeyboardAccessEnabled]) || [super acceptsFirstResponder]; } -- (BOOL)performKeyEquivalent:(NSEvent *)theEvent -{ - if (self.onClick != nil && - [self focusable] && - [[self window] firstResponder] == self) { - if ([[theEvent characters] isEqualToString:@" "] || [[theEvent characters] isEqualToString:@"\r"]) { - self.onClick(nil); - return YES; - } - } - return [super performKeyEquivalent:theEvent]; -} - - (void)updateTrackingAreas { if (_trackingArea) {