Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Android: Keyboard gets dismissed when writing and pressing enter to create a new block #381

Closed

Description

@mzorz

When typing on a paragraph or Title block and tapping Enter to create a new block, the soft keyboard is dismissed, thus interrupting the writing flow.

jumpiness

Activity

  1. added this to the Alpha milestone on Dec 14, 2018
  2. daniloercoli commented on Dec 14, 2018

    @daniloercoli
    Contributor

    I've investigated this issue going back in git history, and found out that the culprit is this PR here: #341

    The problem lays in the GB side PR WordPress/gutenberg#12765
    If you comment the code added in the PR above, the keyboard is not dismissed anymore on Enter.key pressed event, of course, you will re-introduce the issue the original pr fixed.

    Putting some log in the code also shown that the calls are made correctly, first the blur method of the old field is called, (that in turn executes TextInputState.blurTextInput(ReactNative.findNodeHandle(this));), then the call to focus on the new field is made and TextInputState.focusTextInput(ReactNative.findNodeHandle(this)); executed.

  3. self-assigned this
    on Dec 14, 2018
  4. mzorz commented on Dec 14, 2018

    @mzorz
    ContributorAuthor

    Thanks for digging into it @daniloercoli ! I was wondering maybe we could put a flag somewhere, so to prevent Blur from being called if the flag is set, i.e. for example when we know we are doing a block split, we set the flag on, once the split ends, we set the flag off. This would probably require 2 actions on the redux store. IDK, just a thought.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions