Open
Bug 1586033
Opened 5 years ago
Updated 2 years ago
contenteditable: range startOffset and endOffset have incorrect values after paste
Categories
(Core :: DOM: Selection, defect, P3)
Tracking
()
UNCONFIRMED
People
(Reporter: peterkwebb, Unassigned)
Details
Attachments
(1 file)
716 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
- Open attached file 'Contenteditable1.html' in Firefox Nightly (71.0a1).
- Within the outlined contenteditable paragraph, place caret in the text in various places and select parts of the text to confirm that startOffset and endOffset are giving expected values.
- Select text "CD" and use cut-and-paste (or drag) to insert after "AB" (so text becomes alphabetical).
- Place the caret before each of the characters ABCDEFGH and after the 'H', noting the values of startOffset and endOffset.
- Select 'BCDE' in text (for example) and note values of startOffset and endOffset.
Note Chrome, Edge and IE have same, or similar, behaviour.
Actual results:
Observed values for startOffset and endOffset: 0 1 0 1 0 1 2 3 4.
With 'BCDE' selected observed startOffset=1 and endOffset=1 (implying caret in text with no text selected).
Expected results:
Expected values for startOffset and endOffset: 0 1 2 3 4 5 6 7 8.
With 'BCDE' selected expect startOffset=1 and endOffset=5 (implying 4 characters selected).
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Component: Untriaged → Editor
Product: Firefox → Core
Updated•5 years ago
|
Component: Editor → Selection
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•