Skip to content

[0.66] Handle "Escape" key for TextInput #1048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2732ea2
fix (iOS): Only try to make the alert window key if the app recognize…
amgleitman Feb 5, 2022
0b58ac1
Applying package update to 0.66.9 ***NO_CI***
rnbot Feb 5, 2022
504349e
Remove duplicate RCTDevSettingsInspectable
amgleitman Feb 3, 2022
e9cc8e8
Mark new RCTEventEmitter properties as nullable
amgleitman Feb 3, 2022
040118c
Merge pull request #1013 from amgleitman/amgleitman/0.66-stable-cherr…
amgleitman Feb 8, 2022
fc957e7
Applying package update to 0.66.10 ***NO_CI***
rnbot Feb 9, 2022
bb08860
fix: Hermes no longer builds without `Exception.cpp` (#982) (#1021)
tido64 Feb 14, 2022
fc720c2
Adding patches required for running RN66 in Office apps (#1023)
mganandraj Feb 14, 2022
9e17bf4
Applying package update to 0.66.11 ***NO_CI***
rnbot Feb 14, 2022
8862ef5
Make RCTBundleManager's bundleURL a strong property
amgleitman Feb 15, 2022
4bed389
Merge pull request #1027 from amgleitman/amgleitman/0.66-stable-cherr…
amgleitman Feb 17, 2022
2291936
Applying package update to 0.66.12 ***NO_CI***
rnbot Feb 17, 2022
7b6aa55
[0.66] Backport a few of 10.15+ changes to 0.66 stable (#1030)
Saadnajmi Feb 19, 2022
449e1d0
Applying package update to 0.66.13 ***NO_CI***
rnbot Feb 19, 2022
a5459c8
Adding patch to ensure rn-tester for android builds successfully
rasaha91 Feb 3, 2022
4a59492
Adding step to build rn-tester app for android in PR pipeline
rasaha91 Feb 3, 2022
42b57b3
[0.66] Enable ASAN and clang static analyzer (#1033)
HeyImChris Feb 19, 2022
90858ec
Applying package update to 0.66.14 ***NO_CI***
rnbot Feb 19, 2022
76d768f
Merge pull request #1031 from rasaha91/0.66-cherry-pick-android-patch…
rasaha91 Feb 22, 2022
f2506ad
Applying package update to 0.66.15 ***NO_CI***
rnbot Feb 22, 2022
3b9c086
Merge pull request #1032 from rasaha91/0.66-cherry-pick-build-rnteste…
rasaha91 Feb 22, 2022
f755f9b
Applying package update to 0.66.16 ***NO_CI***
rnbot Feb 22, 2022
d395dcd
Cleaning up parts of android-pr.yml
rasaha91 Feb 22, 2022
a30f37b
Merge pull request #1039 from rasaha91/cherry-pick-pr-cleanup
rasaha91 Feb 23, 2022
b758848
Applying package update to 0.66.17 ***NO_CI***
rnbot Feb 23, 2022
dcbab49
Handle "Escape" key for TextInput (#1044)
Saadnajmi Feb 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .ado/android-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,24 @@ jobs:
- task: CmdLine@2
displayName: Remove RNTesterApp.android.bundle
inputs:
script: rm -f RNTesterApp.android.bundle
script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle

- task: CmdLine@2
displayName: Create RNTester bundle
inputs:
script: node cli.js bundle --entry-file ./packages/rn-tester/js/RNTesterApp.android.js --bundle-output RNTesterApp.android.bundle --platform android
script: node cli.js bundle --entry-file ./packages/rn-tester/js/RNTesterApp.android.js --bundle-output ./packages/rn-tester/js/RNTesterApp.android.bundle --platform android

- task: CmdLine@2
displayName: gradlew installArchives
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew installArchives -Pparam="excludeLibs"

- template: templates\prep-android-nuget.yml
- task: CmdLine@2
displayName: Build rn-tester
inputs:
script: REACT_NATIVE_BOOST_PATH=$(System.DefaultWorkingDirectory)/build_deps ./gradlew :packages:rn-tester:android:app:assemble

- template: templates/prep-android-nuget.yml

# Verify depenendencies can be enumerated and downloaded ..
- task: CmdLine@2
Expand Down
3 changes: 2 additions & 1 deletion .ado/templates/android-build-office.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ steps:

# Install NuGet
- task: CmdLine@2
displayName: Install NuGet
inputs:
script: mkdir $(System.DefaultWorkingDirectory)/nuget-bin/ && curl -o $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
script: curl -o $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe --create-dirs https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

- task: CmdLine@2
displayName: "Rename package to react-native"
Expand Down
2 changes: 1 addition & 1 deletion .ado/templates/apple-droid-node-patching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ steps:
- task: CmdLine@2
displayName: Apply Android specific patches for Office consumption
inputs:
script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus MAC ImageColor --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
script: node $(System.DefaultWorkingDirectory)/android-patches/bundle/bundle.js patch $(System.DefaultWorkingDirectory) Build OfficeRNHost V8 Focus MAC ImageColor JniUtils RootViewAttach --patch-store $(System.DefaultWorkingDirectory)/android-patches/patches --log-folder $(System.DefaultWorkingDirectory)/android-patches/logs --confirm ${{ parameters.apply_office_patches }}
56 changes: 28 additions & 28 deletions Brewfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,79 @@
"entries": {
"brew": {
"node@12": {
"version": "12.22.9",
"version": "12.22.10",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:bd8e7c10aff49ccc4a6bc4885ff1368863ced239dc795db73fb357707fae8bd1",
"sha256": "bd8e7c10aff49ccc4a6bc4885ff1368863ced239dc795db73fb357707fae8bd1"
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:d855774f6d428e2e6d258eaf88fa60a941b6d2c9ecca3596d4156f35e7896dbe",
"sha256": "d855774f6d428e2e6d258eaf88fa60a941b6d2c9ecca3596d4156f35e7896dbe"
},
"arm64_big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:fee8d40df865286e3e2d1d1f0b0e7f50042d49f9f1b7e53dd1f697bd33a4f50f",
"sha256": "fee8d40df865286e3e2d1d1f0b0e7f50042d49f9f1b7e53dd1f697bd33a4f50f"
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:676b39ab4e74c531287956cc4e5478c7c4a22581584edb88d76b7623ab70f811",
"sha256": "676b39ab4e74c531287956cc4e5478c7c4a22581584edb88d76b7623ab70f811"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:e4353eda968bd35510b880d8a2aa1c2d1385bc1f00ef5e0d1c4d2b5bf6d1840a",
"sha256": "e4353eda968bd35510b880d8a2aa1c2d1385bc1f00ef5e0d1c4d2b5bf6d1840a"
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:888cba85ca478f974dd0d8f6abd2de3e93f009fc40cb01584a609d0c4ea7b998",
"sha256": "888cba85ca478f974dd0d8f6abd2de3e93f009fc40cb01584a609d0c4ea7b998"
},
"big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:5633a57b983e0c3993e0f653c0fdf589142e5cea3f55c40009989a4af527f3c1",
"sha256": "5633a57b983e0c3993e0f653c0fdf589142e5cea3f55c40009989a4af527f3c1"
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:d6470997250871edc042834db307e7c302ebad0b1b9bbca771ecd5ec0e188314",
"sha256": "d6470997250871edc042834db307e7c302ebad0b1b9bbca771ecd5ec0e188314"
},
"catalina": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:a992a4b5b262ec6935125ca18f21207f5948b709859ebd8d7367e802ea236a49",
"sha256": "a992a4b5b262ec6935125ca18f21207f5948b709859ebd8d7367e802ea236a49"
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:dd9dae6bc8610ea18d8533c627dc335bb372688b04404d7a7316ecc9ce9037aa",
"sha256": "dd9dae6bc8610ea18d8533c627dc335bb372688b04404d7a7316ecc9ce9037aa"
},
"x86_64_linux": {
"cellar": ":any_skip_relocation",
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:f00822df96f1337acdf4ce4d5aceddf1f4cadd940bdf9981ce79cb223ae7592d",
"sha256": "f00822df96f1337acdf4ce4d5aceddf1f4cadd940bdf9981ce79cb223ae7592d"
"url": "https://ghcr.io/v2/homebrew/core/node/12/blobs/sha256:4aafe9d8d830131e245b11fd5d969e9e4e17f37b57389ffa35599e9e8c00178c",
"sha256": "4aafe9d8d830131e245b11fd5d969e9e4e17f37b57389ffa35599e9e8c00178c"
}
}
}
},
"watchman": {
"version": "2022.01.17.00",
"version": "2022.02.14.00_1",
"bottle": {
"rebuild": 0,
"root_url": "https://ghcr.io/v2/homebrew/core",
"files": {
"arm64_monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:59b1b04b08f3bed07f73c35bcdf40da70b2ecb31d31652144b19fc4547b9716a",
"sha256": "59b1b04b08f3bed07f73c35bcdf40da70b2ecb31d31652144b19fc4547b9716a"
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:a17cb20e09f964505dbcc8ce690252bafdb699444c295bfd05ee2edc1a110db9",
"sha256": "a17cb20e09f964505dbcc8ce690252bafdb699444c295bfd05ee2edc1a110db9"
},
"arm64_big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:b94520541990f7c26c611416d7e059bff421547d1f68efda96fd68538280dfa4",
"sha256": "b94520541990f7c26c611416d7e059bff421547d1f68efda96fd68538280dfa4"
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:d687120b74f8097c9d9be56220464f2b48438aad3069d8f36755e1b4a12167aa",
"sha256": "d687120b74f8097c9d9be56220464f2b48438aad3069d8f36755e1b4a12167aa"
},
"monterey": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:3caca0db1ffe6ca2354976be03bb9c76f4512b5a5e1923d9610f8559fa6f86e1",
"sha256": "3caca0db1ffe6ca2354976be03bb9c76f4512b5a5e1923d9610f8559fa6f86e1"
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:0e69c1317cc15cee2ab026bcaa1e07f0f0d578e0a4f2228ac83e18c5d7a810d0",
"sha256": "0e69c1317cc15cee2ab026bcaa1e07f0f0d578e0a4f2228ac83e18c5d7a810d0"
},
"big_sur": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:146c5006c33b266101858632275e4996cccf99ba5c5a02c98b0a5cb4c72d0860",
"sha256": "146c5006c33b266101858632275e4996cccf99ba5c5a02c98b0a5cb4c72d0860"
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:9b0437d417a213862cf0f268b512762002afbf01c2a8d3312f4f8a33fe610a83",
"sha256": "9b0437d417a213862cf0f268b512762002afbf01c2a8d3312f4f8a33fe610a83"
},
"catalina": {
"cellar": ":any",
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:da7d2aea136a9c80606232cebd2f120c0336bba57601166cd71f5fdb7a07a369",
"sha256": "da7d2aea136a9c80606232cebd2f120c0336bba57601166cd71f5fdb7a07a369"
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:b74bd7a2fc852fc8978940591bd0d13d93eece6be1d5f6746db529e07552913e",
"sha256": "b74bd7a2fc852fc8978940591bd0d13d93eece6be1d5f6746db529e07552913e"
},
"x86_64_linux": {
"cellar": "/home/linuxbrew/.linuxbrew/Cellar",
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:f2fd1a6cde41f21cf627dc92ca6762136195540c26dd3999b2f9278165f4ac37",
"sha256": "f2fd1a6cde41f21cf627dc92ca6762136195540c26dd3999b2f9278165f4ac37"
"url": "https://ghcr.io/v2/homebrew/core/watchman/blobs/sha256:d23dbea274bd72952221032f011e22ff8894d57efe6aa2be137c028395c4d1a6",
"sha256": "d23dbea274bd72952221032f011e22ff8894d57efe6aa2be137c028395c4d1a6"
}
}
}
Expand All @@ -84,9 +84,9 @@
"system": {
"macos": {
"catalina": {
"HOMEBREW_VERSION": "3.3.11",
"HOMEBREW_VERSION": "3.3.15",
"HOMEBREW_PREFIX": "/usr/local",
"Homebrew/homebrew-core": "84eb4bfe413a805ceb7ed68e14dab083bdf3beb9",
"Homebrew/homebrew-core": "1614144f26fa67f511b8973fe85f2383e52457b5",
"CLT": "12.4.0.0.1.1610135815",
"Xcode": "12.4",
"macOS": "10.15.7"
Expand Down
25 changes: 25 additions & 0 deletions Libraries/AddressSanitizerCrash/RCTAddressSanitizerCrash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/

'use strict';
import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
import type {ViewProps} from '../Components/View/ViewPropTypes';

const {requireNativeComponent} = require('react-native');

type NativeProps = $ReadOnly<{|
...ViewProps,
|}>;

const RCTAddressSanitizerCrash: HostComponent<NativeProps> = requireNativeComponent<NativeProps>(
'RCTAddressSanitizerCrash',
);

module.exports = RCTAddressSanitizerCrash;
2 changes: 1 addition & 1 deletion Libraries/Core/ReactNativeVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
exports.version = {
major: 0,
minor: 66,
patch: 8,
patch: 17,
prerelease: null,
};
10 changes: 2 additions & 8 deletions Libraries/Image/RCTImageView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -649,18 +649,12 @@ - (RCTPlatformView *)reactAccessibilityElement

- (NSColor *)tintColor
{
NSColor *tintColor = nil;
if (@available(macOS 10.14, *)) {
tintColor = _imageView.contentTintColor;
}
return tintColor;
return _imageView.contentTintColor;
}

- (void)setTintColor:(NSColor *)tintColor
{
if (@available(macOS 10.14, *)) {
_imageView.contentTintColor = tintColor;
}
_imageView.contentTintColor = tintColor;
}
#endif // ]TODO(macOS GH#774)

Expand Down
17 changes: 16 additions & 1 deletion Libraries/StyleSheet/PlatformColorValueTypes.macos.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export opaque type NativeColorValue = {
dynamic?: {
light: ?(ColorValue | ProcessedColorValue),
dark: ?(ColorValue | ProcessedColorValue),
highContrastLight?: ?(ColorValue | ProcessedColorValue),
highContrastDark?: ?(ColorValue | ProcessedColorValue),
},
colorWithSystemEffect?: {
baseColor: ?(ColorValue | ProcessedColorValue),
Expand Down Expand Up @@ -51,12 +53,21 @@ export const ColorWithSystemEffectMacOSPrivate = (
export type DynamicColorMacOSTuplePrivate = {
light: ColorValue,
dark: ColorValue,
highContrastLight?: ColorValue,
highContrastDark?: ColorValue,
};

export const DynamicColorMacOSPrivate = (
tuple: DynamicColorMacOSTuplePrivate,
): ColorValue => {
return {dynamic: {light: tuple.light, dark: tuple.dark}};
return {
dynamic: {
light: tuple.light,
dark: tuple.dark,
highContrastLight: tuple.highContrastLight,
highContrastDark: tuple.highContrastDark,
},
};
};

export const normalizeColorObject = (
Expand All @@ -74,6 +85,8 @@ export const normalizeColorObject = (
dynamic: {
light: normalizeColor(dynamic.light),
dark: normalizeColor(dynamic.dark),
highContrastLight: normalizeColor(dynamic.highContrastLight),
highContrastDark: normalizeColor(dynamic.highContrastDark),
},
};
return dynamicColor;
Expand Down Expand Up @@ -104,6 +117,8 @@ export const processColorObject = (
dynamic: {
light: processColor(dynamic.light),
dark: processColor(dynamic.dark),
highContrastLight: processColor(dynamic.highContrastLight),
highContrastDark: processColor(dynamic.highContrastDark),
},
};
return dynamicColor;
Expand Down
2 changes: 2 additions & 0 deletions Libraries/StyleSheet/PlatformColorValueTypesMacOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import type {ColorValue} from './StyleSheet';
export type DynamicColorMacOSTuple = {
light: ColorValue,
dark: ColorValue,
highContrastLight?: ColorValue,
highContrastDark?: ColorValue,
};

export const DynamicColorMacOS = (
Expand Down
9 changes: 8 additions & 1 deletion Libraries/StyleSheet/PlatformColorValueTypesMacOS.macos.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ import {
export type DynamicColorMacOSTuple = {
light: ColorValue,
dark: ColorValue,
highContrastLight?: ColorValue,
highContrastDark?: ColorValue,
};

export const DynamicColorMacOS = (
tuple: DynamicColorMacOSTuple,
): ColorValue => {
return DynamicColorMacOSPrivate({light: tuple.light, dark: tuple.dark});
return DynamicColorMacOSPrivate({
light: tuple.light,
dark: tuple.dark,
highContrastLight: tuple.highContrastLight,
highContrastDark: tuple.highContrastDark,
});
};

export type SystemEffectMacOS =
Expand Down
2 changes: 2 additions & 0 deletions Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)textInputShouldHandleDeleteBackward:(id<RCTBackedTextInputViewProtocol>)sender; // Return `YES` to have the deleteBackward event handled normally. Return `NO` to disallow it and handle it yourself. TODO(OSS Candidate ISS#2710739)
#if TARGET_OS_OSX // [TODO(macOS GH#774)
- (BOOL)textInputShouldHandleDeleteForward:(id<RCTBackedTextInputViewProtocol>)sender; // Return `YES` to have the deleteForward event handled normally. Return `NO` to disallow it and handle it yourself.

- (void)textInputDidCancel; // Handle `Escape` key press.
#endif // ]TODO(macOS GH#774)

@optional
Expand Down
18 changes: 15 additions & 3 deletions Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,17 @@ - (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor

- (BOOL)control:(NSControl *)control textView:(NSTextView *)fieldEditor doCommandBySelector:(SEL)commandSelector
{
id<RCTBackedTextInputDelegate> textInputDelegate = [_backedTextInputView textInputDelegate];
BOOL commandHandled = NO;
// enter/return
if (commandSelector == @selector(insertNewline:) || commandSelector == @selector(insertNewlineIgnoringFieldEditor:)) {
[self textFieldDidEndEditingOnExit];
if ([[_backedTextInputView textInputDelegate] textInputShouldReturn]) {
if ([textInputDelegate textInputShouldReturn]) {
[[_backedTextInputView window] makeFirstResponder:nil];
}
commandHandled = YES;
//backspace
} else if (commandSelector == @selector(deleteBackward:)) {
id<RCTBackedTextInputDelegate> textInputDelegate = [_backedTextInputView textInputDelegate];
if (textInputDelegate != nil && ![textInputDelegate textInputShouldHandleDeleteBackward:_backedTextInputView]) {
commandHandled = YES;
} else {
Expand All @@ -214,7 +214,13 @@ - (BOOL)control:(NSControl *)control textView:(NSTextView *)fieldEditor doComman
//paste
} else if (commandSelector == @selector(paste:)) {
_backedTextInputView.textWasPasted = YES;
}
//escape
} else if (commandSelector == @selector(cancelOperation:)) {
[textInputDelegate textInputDidCancel];
[[_backedTextInputView window] makeFirstResponder:nil];
commandHandled = YES;
}

return commandHandled;
}

Expand Down Expand Up @@ -411,6 +417,12 @@ - (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector
//deleteForward
} else if (commandSelector == @selector(deleteForward:)) {
commandHandled = textInputDelegate != nil && ![textInputDelegate textInputShouldHandleDeleteForward:_backedTextInputView];
//escape
} else if (commandSelector == @selector(cancelOperation:)) {
[textInputDelegate textInputDidCancel];
[_backedTextInputView.window makeFirstResponder:nil];
commandHandled = YES;

}

return commandHandled;
Expand Down
9 changes: 9 additions & 0 deletions Libraries/Text/TextInput/RCTBaseTextInputView.m
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,15 @@ - (BOOL)textInputShouldHandleDeleteBackward:(__unused id)sender {
- (BOOL)textInputShouldHandleDeleteForward:(__unused id)sender {
return YES;
}

- (void)textInputDidCancel {
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeKeyPress
reactTag:self.reactTag
text:nil
key:@"Escape"
eventCount:_nativeEventCount];
[self textInputDidEndEditing];
}
#endif // ]TODO(macOS GH#774)

- (void)updateLocalData
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You can read more about the macOS implementation on our website - [React Native

## Requirements

You can run React Native for macOS apps on Mac devices with versions Mojave (10.14) or newer.
You can run React Native for macOS apps on Mac devices with versions Catalina (10.15) or newer.

For a full and detailed list of the system requirements and how to set up your development platform, see our [System Requirements](https://microsoft.github.io/react-native-windows/docs/rnm-dependencies) documentation on our website.

Expand Down
2 changes: 1 addition & 1 deletion React/Base/RCTBridgeModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ typedef NSURL * (^RCTBridgelessBundleURLGetter)(void);
andSetter:(RCTBridgelessBundleURLSetter)setter
andDefaultGetter:(RCTBridgelessBundleURLGetter)defaultGetter;
- (void)resetBundleURL;
@property NSURL *bundleURL;
@property (strong) NSURL *bundleURL;
@end

typedef RCTPlatformView * (^RCTBridgelessComponentViewProvider)(NSNumber *); // TODO(macOS GH#774)
Expand Down
Loading