Closed
Bug 1712255
Opened 3 years ago
Closed 3 years ago
setRangeText does not fire select event from disconnected text controls
Categories
(Core :: DOM: Selection, defect)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
90 Branch
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
var element = document.createElement("input");
element.value = "foo ".repeat(10);
element.onselect = console.log;
element.setSelectionRange(0, 100);
element.setRangeText("", 10, 12);
Expected: Two select events
Actual: One select event
Assignee | ||
Comment 1•3 years ago
|
||
Capping selection range in SetValue early makes the subsequent SetSelectionRange call unable to detect actual selection range change. This patch defers it so that select events can be consistently fired.
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d97093bef691
Defer SetMaxLength in SetValueFromSetRangeText r=masayuki
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/29088 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
•