Only select selectable element if it isn't editable
Categories
(Core :: DOM: Selection, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(1 file)
When using <div contenteditable>A[]<span contenteditable=false><B</span>C</div>
([] is caret), then user uses [Shift]
+ [arrow right]
, Gecko select non-editable text and "C" character. Blink and Webkit only select non-editable text only.
Assignee | ||
Comment 1•4 years ago
|
||
When caret is [] in the following html then we use [shift] + [arrow right],
Gecko select non-editable text and "C" character. This behaviour is different
of Blink and WebKit. They select only non-editable element by this operation.
<div contenteditable>A[]<span contenteditable=false><B</span>C</div>
Another example is <img>
element with contenteditable=false
. If this
<img>
element is editable, [shift] + [arrow right] doesn't select "C"
character, but if this <img>
element isn't editable, [shift] + [arrow right]
selects additional "C" character on Gecko.
<div contenteditable>A[]<img contenteditable=false src=... />C</div>
So I would like to change this behaviour to Blink/Webkit way.
PeekOffsetForCharacter
is looking for selection end. When it is selecting
elements, if traversed frame/content has non-select frame/content, we select
first character of editable text. But when we already have selected element,
it is unnecessary to select editable text.
Also, bug1524266-4.html is unfortunately work now and we don't support white
space compression for this situation (bug 1670518). Even if inner span is
editable, we don't compress white space. So we need a workaround for this
test.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
bugherder |
Description
•