New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 721620 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 3
Type: Bug-Regression



Sign in to add a comment

IME doesn't work well caret just after cE=false element

Reported by hoangnam...@gmail.com, May 12 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. <div contenteditable="true">
    <p><span contenteditable="false">@Tester</span></p>
</div>
2. Focus on the div
3. Type in Japanese

What is the expected behavior?

What went wrong?
- The cursor will not show up properly when you focus on the div, it shows up at the end of the div but not after the span tag
- Can't type in Japanese, other languages work well
- Sample link: https://jsfiddle.net/sds0ax4a/

Did this work before? Yes 56

Chrome version: 58.0.3029.110  Channel: stable
OS Version: OS X 10.10.2
Flash Version: Shockwave Flash 25.0 r0
 

Comment 1 by tkent@chromium.org, May 12 2017

Components: -UI Blink>Editing
Labels: Needs-Bisect
Labels: Needs-Triage-M58
Cc: kavvaru@chromium.org
Labels: -Pri-2 -Needs-Bisect has-bisect-per-revision M-60 OS-Windows Pri-1
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on windows 10, Mac 10.12.4 using chrome version 58.0.3029.110  and canary 60.0.3099.0 with the below steps

1. open https://jsfiddle.net/sds0ax4a/ 
2. focus on div
3. type in Japanese language
4. Observed not able type after 2 letters 

This is regression issue broken in M57.Please find the bisect information as below

Narrow Bisect::
Good:: 57.0.2951.0 -- (build revision 438385)
Bad:: 57.0.2952.0  --  (build revision 438707)

Change Log::
https://chromium.googlesource.com/chromium/src/+log/afdef36fb3116c5b6e07a5727bf9ee42e690ed4e..bcd68bcb14206d4f26c5798ed714a0878ac09b28

Note:: Observed the cursor shows at the end of the div for both good and bad builds.

Unable to find the suspect from the above CL.Could any one from dev team please look into this issue.

Thanks, 

Comment 4 by yosin@chromium.org, May 16 2017

Components: -Blink>Editing Blink>Editing>IME
Owner: changwan@chromium.org
Status: Assigned (was: Untriaged)
Summary: IME doesn't work well caret just after cE=false element (was: Span contenteditable not working properly)
Seems to caused by [1] according to change log in #c3.

changwan@, could you take look?

[1] http://crrev.com/2530843003 Introduce InsertIncrementalTextCommand to respect existing style for composition
Sorry to interrupt you but do you have any idea about when this problem could be solved?
I really appreciate any help you can provide.
Cc: yosin@chromium.org aelias@chromium.org
Ok, I investigated a bit.

Although yabinh@'s CL somehow uncovered it a bit, but I think a similar problem was there for a long time. There's lots of logic change in yabinh@'s CL that makes partial revert difficult.

On Linux, if you compose "aa",

SetComposition("a")
SetComposition("aa")

Then the second call is incremental but SetEditableSelectionOffsets() returns false because Editor::IsEditable() returns false.

On Android, when you compose "a",

SetComposition("a")

This alone hides keyboard because input type becomes NONE.

When you set selection, e.g. using SetSelectionOffsets(PlainTextRange(7, 7)),
there are two different positions that this can end up.

1) at the end of the read-only DIV
2) after the read-only DIV

But we seem to interpret this as 1) now.

yosin@, would it make sense to add an option for FrameSelection::SetSelection() to prefer editable position in this case? Please advise.

Comment 7 by yosin@chromium.org, May 25 2017

Labels: -Pri-1 Pri-2
Thanks for investigation, changwang@!

It seems this is caused by well known visible position canonicalization issue 
for cE=false.

yabinh@'s patch makes IME code expose this.

>would it make sense to add an option for FrameSelection::SetSelection() to prefer 
>editable position in this case? Please advise.

We don't want to do so. This issue should be fixed by changing canonicalization to work
well with cE=false.

Lower to Pri-2, since there are workaround, e.g. Move cE=false element outside editable.

Comment 8 by yosin@chromium.org, Jan 10 2018

Labels: Pri-3

Sign in to add a comment