New issue
Advanced search Search tips

Issue 883200 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Caret movement is inconsistent around empty paragraphs and paragraphs containing a comment

Reported by stef.bus...@gmail.com, Sep 12

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36

Steps to reproduce the problem:
1. Open attached file, or alternatively https://codepen.io/Bwrrp/pen/YOaoWw
2. Place the text caret in the first paragraph.
3. Press down arrow repeatedly to move to the last paragraph.
4. Press up arrow repeatedly to move back to the first paragraph.
5. Use the left and right arrows to move the caret into the empty paragraphs.

What is the expected behavior?
Expected each press of the down arrow to move the caret to the next paragraph, and each press of the up arrow to move to the previous one. Expected the right and left arrows to move into the empty paragraphs after reaching the edge of the adjacent paragraph.

What went wrong?
Using up/down empty paragraphs are visited, except for the middle paragraph, which is skipped in both directions. The only difference to the others is that this paragraph contains a comment node, which should have no effect on its visual representation or behavior.

Using left / right, none of the empty paragraphs can be reached. It is possible to place the cursor in any empty paragraph by clicking.

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 69.0.3497.92  Channel: stable
OS Version: 10.0
Flash Version: 

In Edge everything works as expected. Firefox skips the empty paragraphs for all arrow keys, and draws the caret in a weird position or not at all if placed using the mouse.
 
paragraphs-with-comments.html
423 bytes View Download
Components: -Blink>Editing Blink>Editing>Selection
Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)

Sign in to add a comment