Incorrect cursor position for custom elements inside a <div contenteditable> |
|||||
Issue descriptionChrome Version: 64.0.3282.186 (Official Build) (64-bit) OS: Mac What steps will reproduce the problem? (1) Go to http://output.jsbin.com/xopinor (full code here: http://jsbin.com/xopinor/edit?html,output) (2) Advance the cursor with the keyboard arrows to the period right before the yellow custom element, then press Right Arrow. The cursor will skip to after the custom element *and* the period immediately following it. (3) Similarly, advance to right after the second period, and press the Left Arrow. The cursor would jump over the last period, over the custom element and to after the period preceding it What is the expected result? The cursor should move to directly after the custom element. Safari does this behaviour correctly. What happens instead? The cursor treats the custom element as glued to the character immediately after it.
,
Mar 13 2018
(also possibly related: https://bugs.chromium.org/p/chromium/issues/detail?id=821580)
,
Mar 14 2018
Yosin, could you take a look at this?
,
Mar 14 2018
did some more investigation, and the character immediately before the shadow root looks "sticky" as well: if you move the cursor after the first period (but before the custom element), and press "backspace", the custom element gets deleted, not the period.
,
Mar 20 2018
Shadow Root version: https://jsfiddle.net/hy3fu4s9/6/ - Before.|SKIP ME.After => Before.|SKIP ME.After ; no move - Before.|SKIP ME.After Shift+=> Before.^SKIP ME.|After - Before.SKIP ME.|After <= Before.|SKIP ME.After - Can not place caret to Before.SKIP ME|.After I'm not sure why shadow root only version differs custom element version. # Reference content editable = false https://jsfiddle.net/y104g8mn/1/
,
May 8 2018
,
Jul 4
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by n...@chromium.org
, Mar 13 2018