Open
Bug 1614057
Opened 4 years ago
Updated 2 years ago
Selection’s isCollapsed is set to false for a selection with multiple collapsed ranges
Categories
(Core :: DOM: Selection, defect, P2)
Tracking
()
UNCONFIRMED
People
(Reporter: aruseni.magiku, Unassigned)
Details
Attachments
(1 file)
121.98 KB,
image/png
|
Details |
According to the spec, a selection’s isCollapsed must return true if the anchor and focus are the same. In Firefox, it is possible to add more than one range, and even if all ranges are collapsed, the selection’s isCollapsed is set to false, though its anchor and focus are the same.
This page at MDN states that you actually can have such Selection
object: multiple ranges, but with isCollapsed: true
.
Hi Aruseni, thanks for reporting the issue. This indeed violates the spec. Potentially the fix is simple (https://searchfox.org/mozilla-central/rev/a1592902acabf9bded973067133baaac1457f3d3/dom/base/Selection.h#272-274), but one will have to check potential side-effects.
Priority: -- → P2
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•