Selection not rendered if endpoint is between contenteditables
Reported by
stef.bus...@gmail.com,
Jul 1 2016
|
||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2783.2 Safari/537.36 Example URL: http://codepen.io/Bwrrp/pen/dXWmBp Steps to reproduce the problem: 1. Go to http://codepen.io/Bwrrp/pen/dXWmBp 2. Click anywhere in the preview to select the div around "Inside selection" and "Lorem ipsum…" and cycle through different combinations of contenteditable="true" or contenteditable="false" on the three marked divs. An orange border indicates the contenteditable value "false", blue indicates "true". 3. See the selection disappear when the inner divs have opposite editability compared to the outer div. What is the expected behavior? Expected selection to render correctly in all combinations used in the codepen. What went wrong? When the start point of the selection is located between two elements with contenteditable value opposite to the surrounding element, the selection is not rendered as selection highlight, but as a normal cursor at its end point. Accessing the selection through the window.getSelection() API reveals it is not actually collapsed. This is illustrated in the codepen by displaying the HTML for the first selected element. 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: 53.0.2783.2 Channel: dev OS Version: Flash Version: Shockwave Flash 22.0 r0 As a work-around, uncomment the div class="workaround". It seems that introducing an element without the contenteditable attribute next to the start point of the selection allows the selection to be visible in all combinations. The selection renders as expected in all combinations in Firefox and Edge. This seems to trigger a different bug in Safari, as it silently refuses to set the selection in some combinations or even selects the workaround div instead.
,
Jul 4 2016
,
Jul 13 2016
Due by visible position canonicalization
,
Oct 12 2016
,
Nov 30 2016
,
Dec 2 2016
,
Dec 2 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 b...@chromium.org
, Jul 1 2016