Skip to content

Commit

Permalink
Don't override key presses "Space"/"Enter" to perform onClick in RCTV…
Browse files Browse the repository at this point in the history
…iew (facebook#941)

* add pull yml

* match handleOpenURLNotification event payload with iOS (facebook#755) (facebook#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* [pull] master from microsoft:master (facebook#11)

* Deprecated api (facebook#853)

* Remove deprecated/unused context param
* Update a few Mac deprecated APIs

* Packing RN dependencies, hermes and ignoring javadoc failure,  (facebook#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 (facebook#855)

* add pull yml

* match handleOpenURLNotification event payload with iOS (facebook#755) (facebook#2)

Co-authored-by: Ryan Linton <ryanlntn@gmail.com>

* 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 <ryanlntn@gmail.com>

* Grammar fixes. (facebook#856)

Updates simple grammar issues.

Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Saad Najmi <saadnajmi2@gmail.com>
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>

* remove performKeyEquivalent

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
Co-authored-by: Ryan Linton <ryanlntn@gmail.com>
Co-authored-by: Nick Trescases <42704557+ntre@users.noreply.github.com>
Co-authored-by: Anandraj <anandrag@microsoft.com>
Co-authored-by: Muhammad Hamza Zaman <mh.zaman.4069@gmail.com>
  • Loading branch information
6 people authored Jan 19, 2022
1 parent a45ffbd commit 35c9630
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions React/Views/RCTView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 35c9630

Please sign in to comment.