Closed
Bug 1682313
Opened 4 years ago
Closed 4 years ago
Disconnected cloned textarea does not fire select events
Categories
(Core :: DOM: Selection, defect)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
86 Branch
Tracking | Status | |
---|---|---|
firefox86 | --- | fixed |
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
textarea = document.createElement("textarea");
textarea.textContent = "Foo";
clone = textarea.cloneNode(true);
clone.onselect = console.log;
clone.select();
Expected: Both should fire a select event
Actual: Only the first one should fire one
Cloning the element does not properly set the maxLength in SelectionProperties.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Cloning a textarea element without a dirty value flag does not call SetValue() and thus gets no max length. This makes sure it always gets one before setting selection range.
Updated•4 years ago
|
Assignee: nobody → krosylight
Status: NEW → ASSIGNED
Assignee | ||
Updated•4 years ago
|
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/80e51db676d2
Make sure mMaxLength exists in SetSelectionRange r=masayuki
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/26902 for changes under testing/web-platform/tests
Comment 4•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox86:
--- → fixed
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.
Description
•