mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Implement escape/cancel key press callback for TextInput (#48680)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48680 ## Changelog: [General] [Added] - Adds the escape key to the key press event handler payload. Reviewed By: shwanton Differential Revision: D68186072 fbshipit-source-id: 01786c309bff4991c12fa667e933ff6105efe638
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c89c5d7e3d
commit
e566c1ec06
+2
@@ -119,6 +119,8 @@ static jsi::Value keyPressMetricsPayload(
|
||||
key = "Enter";
|
||||
} else if (keyPressMetrics.text.front() == '\t') {
|
||||
key = "Tab";
|
||||
} else if (keyPressMetrics.text.front() == '\x1B') {
|
||||
key = "Escape";
|
||||
} else {
|
||||
key = keyPressMetrics.text;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user