Cursor stays on same line if enter is pressed after text is entered (Gboard)

PaulB

Well-known member
This issue has returned within the past week or two.

The Chrome team's stance is that keyboard events shouldn't be sending the specific key that the user pressed. Their explanation makes sense, and they've made it clear they have no intention of changing this behavior. Instead, they just send key code 229 (IME). They may send a normal key code at times, but this shouldn't be relied upon.

I suspect Froala isn't handling this gracefully. If I hook up a physical keyboard to my phone and press Enter, key code 13 gets sent and Froala is happy. However, if I press Enter on Gboard, key code 229 (IME) gets sent, and Froala exhibits the bug described in this thread.

I don't think this should be classified as a browser issue: there's nothing here that goes against spec. Chrome is behaving correctly.

This is reproducible on my Pixel 6a running Android 13, security patch 2022-10-05, Chrome 107.0.5304.91, Gboard 12.4.03.482060964-beta-arm64-v8a. Gboard is the default keyboard on this device.

I'm testing using Chrome remote debugging. It's easy to repro that way, and it's easy to compare keyboards since input from the debug client gets sent as traditional keypresses. Set breakpoints on tests for comparisons with KEYCODE.IME.
 
Last edited:
Here are two recordings.

The first is exclusively from my phone:
View attachment screen-20221107-122132.mp4

The second is taken from Chrome remote debugger:
View attachment Screen recording.mp4

There are two breakpoints: one on key code 229, and the other on key code 13. Each time the first breakpoint triggers, I've pressed Enter on my phone. Each time the second breakpoint triggers, I've pressed Enter on the debug client's physical keyboard.

This demonstration uses an up-to-date Pixel 6a. There aren't any notable customizations. I'm using the default keyboard (Gboard) and web browser (Chrome) that come with the device.
 
Back
Top Bottom