Selection in inline element with contenteditable does not account for inserted line breaks
Reported by
jameshfisher@gmail.com,
Jun 11 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36 Example URL: https://jsfiddle.net/4pekem0z/ Steps to reproduce the problem: Create a `<span>` with `contenteditable`. Set up Javascript to do, once per second: get the user's selection, then set the selection to the same as the current selection. Place the cursor in the `<span>`. Hit return several times quickly between runs of the Javascript function. What is the expected behavior? The Javascript has no effect. Since it just gets the selection and sets it to the same thing, it should be identical to it not running. What went wrong? The Javascript function resets the cursor to its original position when it was previously called. The `<br/>` elements inserted into the `<span>` are kept, however. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 50.0.2661.102 Channel: n/a OS Version: OS X 10.11.5 Flash Version: Shockwave Flash 21.0 r0 Correct behavior can be seen in Firefox. Follow the URL to see a demo of this. Note the console.log: the cursor index appears to not be updated after inserting new <br>s in the <span>.
,
Jun 27 2016
It seems visible canonicalization moves caret.
,
Oct 12 2016
,
Oct 4 2017
,
Oct 4
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
,
Oct 5
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mkwst@chromium.org
, Jun 13 2016Components: -Blink Blink>Editing
Status: Untriaged (was: Unconfirmed)