Skip to content

Commit 42fcaa8

Browse files
josepharharmoz-wptsync-bot
authored andcommitted
Bug 1925140 [wpt PR 48658] - Add InputClosesSelect flag, a=testonly
Automatic update from web-platform-tests Add InputClosesSelect flag This flag is intended to de-risk the launch of SelectParserRelaxation by partially reverting the new parser behavior to the old parser behavior specifically in the case of an <input> tag being parsed inside a <select>. The old parser would convert <select><input> into <select></select><input>, and based on my research, this is the case that is most likely going to break sites in SelectParserRelaxation: whatwg/html#10310 Bug: 373672164 Change-Id: I33b40d11c2001092aa076a219dd56c5ea86f13f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936092 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Joey Arhar <[email protected]> Cr-Commit-Position: refs/heads/main@{#1369676} -- wpt-commits: 00e1df7e329f3d11b91d7b2e11a2db63bbd98ef9 wpt-pr: 48658
1 parent 3e60371 commit 42fcaa8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

testing/web-platform/tests/html/semantics/forms/the-select-element/customizable-select/select-parsing.tentative.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
</div>
4343
</select>
4444

45+
<select id=s7>
46+
<input>
47+
</select>
48+
4549
<div id=afterlast>
4650
keep this div after the last test case
4751
</div>
@@ -100,6 +104,13 @@
100104
`);
101105
}, 'Divs and imgs should be allowed as direct children of select and within options without a datalist.');
102106

107+
test(() => {
108+
assert_equals(document.getElementById('s7').parentNode, document.body);
109+
assert_equals(document.getElementById('s7').innerHTML, `
110+
<input>
111+
`);
112+
}, 'Input tags should parse inside select instead of closing the select.');
113+
103114
test(() => {
104115
assert_equals(document.getElementById('afterlast').parentNode, document.body);
105116
}, 'The last test should not leave any tags open after parsing.');

0 commit comments

Comments
 (0)