Skip to content

[Android] [TextInput] blurOnSubmit doesn't really blur i.e. relinquish focus, it only hides the keyboard #7047

@tejasd

Description

@tejasd

For an example of what I'm talking about, take a look at the UIExplorer Android app - the cursor is still visible when you submit and the onBlur callback gets called after you select another TextInput.

I've tried debugging it with no luck (I'm an iOS dev). Some paths I've explored:

  • Changing the onKeyUp() method to call clearFocus() instead of hideSoftKeyboard() in ReactEditText.java - for some reason the debugger never hits that breakpoint.
  • Tried tracing the changes in the blurOnSubmit PR (Enable blurOnSubmit for text input in android #6215) but I hit a roadbloack with trying to understand what's going on

Potential workarounds -
Call the blur() method on the textinput's ref in the TextInput's onSubmitEditing callback

Verified that this is an issue on RN master @ 42cfba5 - 0.24+
Devices: Nexus 5, Genymotion

Would love some help in trying to understand what's going on! Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions