Gutenberg: When using IME and Chrome, delete a new paragraph and enter a sentence, it is inserted in the wrong position.

Created on 7 Nov 2019  ·  14Comments  ·  Source: WordPress/gutenberg

Describe the bug

This problem occurs when inputting Japanese using IME and Google Chrome. ( not happen Firefox / Safari. Not yet tested on Edge or IE 11. )

Press Enter to create a new paragraph block. If you delete the new paragraph with the Backspace or delete key, the next text you type will be inserted at the beginning of the sentence or just after the .

To reproduce
Steps to reproduce the behavior:

  1. open https://wordpress.github.io/gutenberg/ or your Gutenberg on Chrome.
  2. Input text with IME enabled.
  3. Press the Enter key to create a new paragraph.
  4. Press the delete key ( or backspace ) to delete the new paragraph.
  5. Input text with IME enabled.
  6. Press space key to convert characters.
  7. See error

Expected behavior
Sentences are entered where the cursor is.

Screenshots
02
01

Desktop (please complete the following information):

  • OS: mac 10.14.6
  • Browser chrome
  • Version 78.0.3904.97

Additional context

[Package] Rich text [Priority] High [Status] In Progress [Type] Bug

Most helpful comment

Firstly, I have checked with combinations of the Core and the plugin. I found it only seems to happen when using the plugin. I am suspecting may be related to something that is in the plugin which are not yet merged into the core?

WordPress 5.2.4 = Not reproduced
WordPress 5.2.4 + Gutenberg 6.5.0 = Reproduced
WordPress 5.2.4 + Gutenberg 6.6.0 = Reproduced
WordPress 5.2.4 + Gutenberg 6.7.0 = Reproduced
WordPress 5.2.4 + Gutenberg 6.8.0 = Reproduced
WordPress 5.3-RC4 = Not reproduced
WordPress 5.3-RC4 + Gutenberg 6.7.0 = Reproduced
WordPress 5.3-RC4 + Gutenberg 6.8.0 = Reproduced

Secondly, it seems to happen only on new paragraph. Not on existing paragraphs.

Thirdly, as others reported, these were only reproduced in Chrome 78.0.3904.9 and 78.0.3904.87
Not in Safari (13.0.3) nor Firefox (69.0.1).

Tested in Mac OS 10.14.6. IME is ATOK.

All 14 comments

Reproduced.

Desktop :

  • OS: mac 10.14.6
  • Browser chrome
  • Version 78.0.3904.87

It reproduces even without plug-in.

Reproduced.
OS: mac 10.14.6
Browser: chrome 78.0.3904.87(Official Build) & 78.0.3904.97(Official Build)
Gutenberg 6.8.0

But, Not Reproduced.
Browser: safari

Firstly, I have checked with combinations of the Core and the plugin. I found it only seems to happen when using the plugin. I am suspecting may be related to something that is in the plugin which are not yet merged into the core?

WordPress 5.2.4 = Not reproduced
WordPress 5.2.4 + Gutenberg 6.5.0 = Reproduced
WordPress 5.2.4 + Gutenberg 6.6.0 = Reproduced
WordPress 5.2.4 + Gutenberg 6.7.0 = Reproduced
WordPress 5.2.4 + Gutenberg 6.8.0 = Reproduced
WordPress 5.3-RC4 = Not reproduced
WordPress 5.3-RC4 + Gutenberg 6.7.0 = Reproduced
WordPress 5.3-RC4 + Gutenberg 6.8.0 = Reproduced

Secondly, it seems to happen only on new paragraph. Not on existing paragraphs.

Thirdly, as others reported, these were only reproduced in Chrome 78.0.3904.9 and 78.0.3904.87
Not in Safari (13.0.3) nor Firefox (69.0.1).

Tested in Mac OS 10.14.6. IME is ATOK.

I am going to restate the exact process which @torounit has written at the top. Because it seems to be very precise to reproduce it.

  1. Paragraph block. Type something using IME, and press confirm key (e.g. space key) to confirm at the end.
  2. Hit Return key, to start a new paragraph.
  3. With or without typing anything, hit "delete" key. Which should move the cursor back to previous paragraph.
  4. start typing something using IME, and press confirm key. This should cause the error, as reported above.

Notes:

  • At 3. hit "delete" key. If you hit "left" key -- which will only move the cursor back to previous paragraph block, without deleting the new paragraph block -- error does not occur. Even if you start typing something, as long as you go back by hitting delete key, it occurs.
  • Error only seems to occur on the block that is located at the bottom of the content. It does not occur on already written paragraphs that are not at the bottom, or newly inserted paragraph in the middle of the content.

5.2.4 + GB 6.8.

Reproduced.

Tested on https://wordpress.github.io/gutenberg

OS: mac 10.14.6
Browser chrome Version 78.0.3904.97(Official Build)

and

OS: mac 10.15.1
Browser chrome Version 78.0.3904.97(Official Build)

But,
Not Reproduced.
Browser: safari

@mono96 @waviaei @Shizumi @kmix-39

Share the same input results on https://input-inspector.now.sh/ .

Google chrome: ( Reproduced browser )
https://input-inspector.now.sh/profiles/FY0NmqodOIRcuavZ2Fhs

Google Chrome 78.0.3904.87(Official Build)64bit
Reproduced.
https://input-inspector.now.sh/profiles/YjUorTzYBOkrOpZjVRds

Safari 13.0.3 (14608.3.10.10.1)
Not Reproduced.
https://input-inspector.now.sh/profiles/OrPgrXuMTOry1F5jR8jC

Chrome 78.0.3904.10. Mac OS 10.14.6. ATOK IME.
WP 5.3 + Gutenberg 6.9.0
Bug reproduced.

https://input-inspector.now.sh/profiles/U3VIHbWs6kp0Fn3KW0gD

173 = Enter, to go to new paragraph
179 = Backspace, to delete the new paragraph and go back to previous.
258 = Enter, to confirm the change → this moves the caret to the beginning of the paragraph without pasting the entered text.

Chrome 78.0.3904.97. Mac OS 10.14.6. Google IME.
Bug reproduced.

WordPress 5.3 = Reproduced
WordPress 5.3 + Gutenberg 6.9.0 = Reproduced

https://input-inspector.now.sh/profiles/zpkCHi6kwJHm0xj4azQn

@ellatrix

The cursor no longer jumps !!!
Great! Thank you!

Great to hear! :)

@ellatrix

Great!! Thank you very much.

Was this page helpful?
0 / 5 - 0 ratings