Skip to content

Consume Enter key-ups that would trigger native focus advance in TextInput (#59247) - #59247

Open
christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D126482002
Open

christophpurrer wants to merge 1 commit into
react:mainfrom
christophpurrer:export-D126482002

Conversation

@christophpurrer

@christophpurrer christophpurrer commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

  • Problem: An Android TextInput crashes with
    IllegalStateException: focus search returned a view that wasn't able to take focus! from ReactEditText.onKeyUp
    when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
  • Fix: Guard ReactEditText.onKeyUp so every Enter key-up that TextView would turn into native focus advance is
    consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 20, 2026
@meta-codesync

meta-codesync Bot commented Oct 20, 2026

Copy link
Copy Markdown

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126482002.

@meta-codesync meta-codesync Bot changed the title Consume Enter key-ups that would trigger native focus advance in TextInput Consume Enter key-ups that would trigger native focus advance in TextInput (#59247) Oct 20, 2026
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 20, 2026
…Input (react#59247)

Summary:

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 20, 2026
…Input (react#59247)

Summary:

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 20, 2026
…Input (react#59247)

Summary:
Pull Request resolved: react#59247

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 20, 2026
…Input (react#59247)

Summary:
Pull Request resolved: react#59247

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 20, 2026
…Input (react#59247)

Summary:

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 20, 2026
…Input (react#59247)

Summary:
Pull Request resolved: react#59247

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 21, 2026
…Input (react#59247)

Summary:

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
@christophpurrer
christophpurrer force-pushed the export-D126482002 branch 2 times, most recently from 66761f6 to 0acee1d Compare October 22, 2026 15:39
christophpurrer added a commit to christophpurrer/react-native-macos that referenced this pull request Oct 22, 2026
…Input (react#59247)

Summary:

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002
…Input (react#59247)

Summary:
Pull Request resolved: react#59247

- Problem: An Android TextInput crashes with
  `IllegalStateException: focus search returned a view that wasn't able to take focus!` from `ReactEditText.onKeyUp`
  when a numpad Enter, an editor-action Enter, or an Enter on a multiline email input is released.
- Fix: Guard `ReactEditText.onKeyUp` so every Enter key-up that `TextView` would turn into native focus advance is
  consumed, so that focus moves only from JS and the input no longer crashes.

Changelog:
[Android][Fixed] - Fix TextInput crash when an Enter key-up triggers native focus search

Differential Revision: D126482002

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant