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

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

Closed
mzorz opened this issue Dec 14, 2018 · 2 comments
Assignees
Milestone

Comments

@mzorz
Copy link
Contributor

mzorz commented Dec 14, 2018

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

@mzorz mzorz added [Type] Bug Something isn't working Writing Flow labels Dec 14, 2018
@mzorz mzorz added this to the Alpha milestone Dec 14, 2018
@koke koke mentioned this issue Dec 14, 2018
4 tasks
@daniloercoli
Copy link
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.

@daniloercoli daniloercoli self-assigned this Dec 14, 2018
@mzorz
Copy link
Contributor Author

mzorz commented Dec 14, 2018

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
Projects
None yet
Development

No branches or pull requests

2 participants