Gutenberg-mobile: [RichText] if keyboard is up and another RichText is tapped into, keyboard is dismissed

Created on 28 Nov 2018  路  4Comments  路  Source: wordpress-mobile/gutenberg-mobile

To Test:

  1. launch the demo app from scratch
  2. Tap on a RichText block: Welcome to Gutenberg
  3. observe the cursor appears, the block gets selected, the keyboard appears and the editor toolbar reflects the Heading style
  4. now tap into Hello World
  5. observe the cursor appears there, the block gets selected, the editor toolbar reflects the text style, but the keyboard gets hidden.

keyboard_problem

What should happen?

  1. the keyboard should not go away when tapping on an editable component.

Observe that the contrary (jumping from PlainText to RichText) does not happen:

  1. launch the demo app from scratch
  2. tap on a PlainText based component, for example Code block
  3. observe the keyboard appears, cursor blinks
  4. now tap on a RichText component
  5. observe the keyboard is not dismissed.

Where

This is observable both on the emulator and on a real device (Google Pixel 8.1)

Writing Flow [Type] Bug

Most helpful comment

I have a theory for this one: since the message between native and RN is asynchronous (it is, right?), when you tap on the second rich text filed, android does what it's supposed to and switches focus. Then the onBlur gets dispatched and RN asks the first field to blur itself. This doesn't check if the receiver is focused or not and asks to hide the keyboard anyway.

All 4 comments

I have a theory for this one: since the message between native and RN is asynchronous (it is, right?), when you tap on the second rich text filed, android does what it's supposed to and switches focus. Then the onBlur gets dispatched and RN asks the first field to blur itself. This doesn't check if the receiver is focused or not and asks to hide the keyboard anyway.

Reopening this issue since i can still reproduce the problem.

Made a short video where the keyboard is dismissed tapping on a RichText component: https://cloudup.com/cwhQI2NUhcT

The issue happened twice or 3 times in the video. The one at the end is easy noticeable.

Effectively closed in #296

Was this page helpful?
0 / 5 - 0 ratings