WordPress-Android
WordPress-Android copied to clipboard
Block editor: Keyboard is not always shown when a new block is added
Expected behavior
- When a block has focus and a blinking cursor the keyboard is shown.
- After inserting a new block such as a Paragraph or List (step 3 below) the keyboard is shown.
Actual behavior
Sometimes a block added from the Inserter has focus and a blinking cursor, but no keyboard is shown.
Steps to reproduce the behavior
- Create a new Blog post.
- Tap the default Paragraph block ("Start writing..."). There is a blinking cursor and the system's keyboard appears.
- Tap the "+" to open the Inserter and choose a Paragraph or List block (other blocks may be affected as well).
- Observe that the keyboard is no longer showing, but the input cursor is blinking inside the block.
https://user-images.githubusercontent.com/2092798/159974200-cb4fa94e-e9a1-4167-87f4-5741e076e396.mp4
At the end of the video I tapped into Area A (see Extra discussion below).
Extra discussion
I initially thought that you couldn't show the keyboard on the block without toggling its focus, but then learned there's a couple hit areas that behave differently. On the Pixel 4a, at least, it felt like I needed to be extra precise to hit Area A and present the keyboard.
Tested on Pixel 4a, Android 12, WPAndroid 19.5
This issue looks related to https://github.com/WordPress/gutenberg/issues/29048 and https://github.com/WordPress/gutenberg/issues/28748.
I confirm that the issue is still reproducible on 19.7
Reproducible on 20.2 using emulator, but not reproducible using a real device (XT1926-3).
I was able to reproduce on my Samsung Galaxy S21, using Android 12, WP Android 20.3-rc-1.
https://user-images.githubusercontent.com/15107387/179767498-b3549cf8-068a-464e-9fff-7a89cf77b6e3.mp4
I wasn't able to understand why is it not reproducible on some devices 🤔 More info on the devices I wasn't able to reproduce the issue:
Galaxy A11 (SM-A115M/DS) - Android 11 - WP Android 20.3-rc-1
Moto G6 Plus (XT1926-3) - Android 9 - WP Android 20.3-rc-1
During the Groundskeeping I was able to reproduce this issue on the Android 12 Pixel emulator. I couldn't find a particular pattern which might be the cause of this issue. This issue happens on Android 11/Android 12 when I tried to reproduce it. I could see the below log message when the keyboard gets dismissed. Hope it helps
W/InputMethodManager: Ignoring showSoftInput() as view=org.wordpress.mobile.ReactNativeAztec.ReactAztecText is not served.
I'm unable to reproduce this on Pixel 4a - Android 13 - WPAndroid v20.8
Given the issue is not consistent and seems to be device dependent. I'm going to reduce the priority of this to Medium.
Something very similar happens to me on WPA 21.5-rc-1 | Samsung A31 | Android 12:
https://user-images.githubusercontent.com/73365754/213702346-e6fc239e-aed6-4fbf-9efe-394eaad120e8.mp4
Closing this issue as it should be fixed via https://github.com/WordPress/gutenberg/pull/57069 in version 24.0