New issue
Advanced search Search tips

Issue 618318 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Cursor down gets stuck at text wrapped immediately after image

Reported by dive...@gmail.com, Jun 8 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/50.0.2661.102 Chrome/50.0.2661.102 Safari/537.36

Example URL:
data:text/html,<h1%20contenteditable>Foo%20<img%20src='x'%20style='width:90%;%20height:20'>baaaaaaaaaaaaaar%20baz</h1>

Steps to reproduce the problem:
1. Open data:text/html,<h1%20contenteditable>Foo%20<img%20src='x'%20style='width:90%;%20height:20'>baaaaaaaaaaaaaar%20baz</h1>
2. Resize window (if necessary) so 'b' is wrapped to the start of the second line.
3. Put the cursor before 'F', and press down arrow repeatedly.

What is the expected behavior?
Cursor eventually reaches the end of the document (after 'z')

What went wrong?
First down arrow press: cursor lands at the end of the first line.
Second and subsequent down arrow presses: cursor does not move.

(1) For the first down arrow press, Chromium presumably calculates that the cursor would land at the position { node: text node 'baaaaaar', offset: 0 } (which is at the beginning of the second line), but then normalizes that position to { node: h1, offset: 2 } (the end of the first line).

(2) For the second and subsequent down arrow presses, the cursor presumably tries to land start of the next line, which is the same landing position as in (1). The same normalization applies and so the cursor does not move.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes 

Chrome version: 50.0.2661.102  Channel: n/a
OS Version: 
Flash Version: 

This works in Firefox but not in Safari
 
Cc: chrishtr@chromium.org
Components: -Blink Blink>Layout
Could be related to the cursor painting bug we had. chrishtr@, any commonality?
Components: -Blink>Layout Blink>Editing
@schenney: I don't think it is related.
Status: Untriaged (was: Unconfirmed)

Comment 4 by yosin@chromium.org, Jun 9 2016

Components: -Blink>Editing Blink>TextSelection
Labels: -OS-Linux OS-All
Status: Available (was: Untriaged)
This is caret movement issue. Caret before "b" is marked TextAffinity::Upstream, which means caret is at end of line instead of start of line.

Comment 5 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection

Comment 6 by yosin@chromium.org, Oct 4 2017

Labels: Pri-3
Project Member

Comment 7 by sheriffbot@chromium.org, Oct 4

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment