New issue
Advanced search Search tips

Issue 702049 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Ctrl+Right from LTR to RTL makes infinite loop

Project Member Reported by yosin@chromium.org, Mar 16 2017

Issue description

Type Ctrl+Right at the end of "abc" in below HTML makes Blink in infinite loop:

<div id="sample" contenteditable>abc<div dir="rtl">def</div>ghi</div>

See https://jsfiddle.net/7we7tcbt/1/

 

Comment 1 by yosin@chromium.org, Mar 16 2017

Cc: kojii@chromium.org
Components: Blink>Editing
Owner: ----
Status: Available (was: Started)
I attempt to fix but I could not.
Here is what I did: http://crrev.com/2750503013

Unit tests may be useful.


Comment 2 by yosin@chromium.org, Mar 24 2017

Simple tool for this issue: https://jsfiddle.net/3pykkjzd/

Current implementation is broken, in following example, we get anchorOffset=0 instead of anchorOffset=7

Example 1: anchorOffset should be 7
<div id="sample" contenteditable>abc<div dir="rtl">def</div>ghi|</div>

Example 2: anchorOffset should be 0
<div id="sample" contenteditable>abc<div dir="rtl">|def</div>ghi</div>



The repro in #0 only works on Win

To repro on Linux:

Open https://jsfiddle.net/moL9779r/1/, put caret at the end of "abc ", and press Ctrl+Right
Issue 697781 has been merged into this issue.

Comment 5 by yosin@chromium.org, Apr 10 2017

WebKit implements computeInlineBoxPosition() as Position::getInlineBoxAndOffset()[1]

[1] https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/Position.cpp

Comment 6 by yosin@chromium.org, Apr 13 2017

Labels: RTL

Comment 7 by yosin@chromium.org, Apr 13 2017

Components: -Blink>Editing Blink>Editing>Selection

Comment 8 by yosin@chromium.org, Apr 27 2017

Labels: -Pri-1 Pri-2
Lower to Pri-2, since this issue exists long time and I found this in these days.

Comment 9 by yosin@chromium.org, Jun 6 2017

Cc: ajha@chromium.org
 Issue 576384  has been merged into this issue.
Labels: Pri-3
Project Member

Comment 11 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