WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.41k stars 4.16k forks source link

Firefox: Pressing Up arrow takes you two lines up, if cursor is at beginning of second line of paragraph #34215

Open nyanpasu64 opened 3 years ago

nyanpasu64 commented 3 years ago

Description

In a multi-line paragraph, if the cursor is at the beginning of the second line, pressing Up takes you two lines up instead of one. (Gutenberg acts as if the cursor was still within the first line.)

Step-by-step reproduction instructions

  1. Edit a post with any block (quote, paragraph...) followed by a paragraph.
  2. Place the cursor at the second line of the following paragraph.
  3. Press the Up arrow key.

If the "following paragraph" is a quote instead, pressing Up will highlight the quote block (as if the cursor was on the first line) instead of moving the cursor to the first line.

Screenshots, screen recording, code snippet

https://user-images.githubusercontent.com/913957/130326911-b979f81c-69e3-41a1-acf4-656700ecbf02.mp4

Environment info

Pre-checks

westnz commented 3 years ago

I was able to reproduce this.

skorasaurus commented 2 years ago

can confirm this on Gutenberg 13.4; encountered this while troubleshooting https://github.com/WordPress/gutenberg/issues/41416

ellatrix commented 1 year ago

Yes, I encountered this while adding e2e tests for Firefox in #53458.