Closed Bug 1682706 Opened 4 years ago Closed 4 years ago

setRangeText() fires double selection change events

Categories

(Core :: DOM: Selection, defect, P3)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: saschanaz, Assigned: saschanaz)

References

Details

Attachments

(1 file)

// Assuming <textarea id="textarea">New Era</textarea>
textarea.addEventListener("selectionchange", console.log);
textarea.setRangeText("newmiddle", textarea.selectionStart, textarea.selectionEnd, "select");

// Logs two selectionchange events
Severity: -- → S3
Priority: -- → P3
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d07e3cf6247a Use SelectionBatcher in SetRangeText r=masayuki
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27039 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: