Closed
Bug 1712248
Opened 3 years ago
Closed 3 years ago
setRangeText prevents selectionchange for subsequent calls if the selection extends to the end of the text
Categories
(Core :: DOM: Selection, defect, P3)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
90 Branch
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
Details
Attachments
(1 file)
Somehow setRangeText sets the selection end container as the internal <div>
in <textarea>
while it consistently sets it as text node for <input>
.
data:text/html,<textarea id="textarea">foo bar foo bar foo bar foo bar</textarea><script>textarea.addEventListener("selectionchange", console.log);textarea.focus();textarea.setSelectionRange(0, 100);new Array(10).fill(0).forEach(() => textarea.setRangeText("", 10, 12));</script>
Expected: 11 selectionchange events
Actual: 2 selectionchange events
Updated•3 years ago
|
Severity: -- → S3
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All
Assignee | ||
Comment 1•3 years ago
|
||
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/353cc4872a37 Add test for repeated setRangeText calls r=masayuki
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/29156 for changes under testing/web-platform/tests
Comment 4•3 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 3 years ago
status-firefox90:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in
before you can comment on or make changes to this bug.
Description
•