Skip to content

Commit 7917403

Browse files
emiliomoz-wptsync-bot
authored andcommitted
Fix text removal inside the selected option.
This is not really a new regression but my patch changed the additions to be handled better, see comments in the bug. When removing the selected option itself, we're dealing with it correctly via the "ignored" option list, but we don't do that for the selected label. Differential Revision: https://phabricator.services.mozilla.com/D306703 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2047187 gecko-commit: 836781b33d5457f27d2ccbcd120f02f4539957ca gecko-reviewers: jjaschke, dom-core-reviewers
1 parent 41b3cf2 commit 7917403

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!doctype html>
2+
<title>CSS Test Reference</title>
3+
<select style="width: 400px">
4+
<option value="1">New text</option>
5+
</select>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!doctype html>
2+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=2047187">
3+
<link rel="match" href="combobox-selected-option-text-removal-ref.html">
4+
<select style="width: 400px">
5+
<option id="opt" value="1">Old text</option>
6+
</select>
7+
<script>
8+
onload = () => {
9+
const opt = document.getElementById('opt');
10+
const oldText = opt.firstChild;
11+
const newText = document.createTextNode('New text');
12+
opt.insertBefore(newText, oldText);
13+
opt.removeChild(oldText);
14+
};
15+
</script>

0 commit comments

Comments
 (0)