Skip to content
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

Textinput range fix #1296

Merged
merged 21 commits into from
Jul 27, 2022
Merged

Textinput range fix #1296

merged 21 commits into from
Jul 27, 2022

Conversation

chiuam
Copy link

@chiuam chiuam commented Jul 27, 2022

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This change addresses #1295. We call charactersIgnoringModifiers to decode the incoming keyboard event and it returns an empty string for some special characters. Let's add a check to catch that to avoid getting the "index out of bound" error.

Changelog

[macOS] [Fixed] - Add string check for special characters

Test Plan

Rerun the repro steps, error message no longer appears in the console.

chiuam and others added 21 commits May 19, 2022 17:24
@chiuam chiuam requested a review from a team as a code owner July 27, 2022 20:33
@chiuam chiuam merged commit ea19204 into microsoft:main Jul 27, 2022
@chiuam chiuam deleted the textinput-range-fix branch July 27, 2022 21:26
chiuam added a commit to chiuam/react-native-macos that referenced this pull request Jul 27, 2022
chiuam added a commit to chiuam/react-native-macos that referenced this pull request Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants