From 244f281577f2266d1ce01593618ce5325bce6265 Mon Sep 17 00:00:00 2001 From: Joey Arhar Date: Wed, 8 Apr 2026 17:56:07 -0700 Subject: [PATCH] Check disabled when building selectedcontent list This changes the behavior when selecting a new option in the case that there are nested selectedcontent elements inside the select. Before, the disabled selectedcontent would get cloned, but now it won't. Context: https://github.com/whatwg/html/pull/12263#discussion_r2989223569 Bug: 458113204 Change-Id: I9afd550f21787b7daefb48c5a76712b5899e5b42 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7737623 Reviewed-by: David Grogan Reviewed-by: Joey Arhar Commit-Queue: Joey Arhar Cr-Commit-Position: refs/heads/main@{#1611875} --- .../selectedcontent-mutations.html | 2 -- .../selectedcontent-nested.html | 22 ++++++++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html b/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html index e4e3e994d91658..ff1b6a1b2b2f33 100644 --- a/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html +++ b/html/semantics/forms/the-select-element/customizable-select/selectedcontent-mutations.html @@ -326,9 +326,7 @@ "Type: childList | Target: select | Added: [#text: \"\"] | After: button", "Type: childList | Target: select | Added: [option] | After: #text: \"\"", "Type: childList | Target: selectedcontent | Removed: [#text: \"outer1\", selectedcontent, #text: \"\"]", - "Type: childList | Target: selectedcontent | Removed: [#text: \"inner1\"]", "Type: childList | Target: selectedcontent | Removed: [#text: \"outer2\", selectedcontent, #text: \"\"]", - "Type: childList | Target: selectedcontent | Removed: [#text: \"inner2\"]", "Type: childList | Target: option | Added: [#text: \"option\"]", "Type: childList | Target: selectedcontent | Added: [#text: \"option\"]", "Type: childList | Target: selectedcontent | Added: [#text: \"option\"]", diff --git a/html/semantics/forms/the-select-element/customizable-select/selectedcontent-nested.html b/html/semantics/forms/the-select-element/customizable-select/selectedcontent-nested.html index fd2df7a96d8dfb..31a364ae278136 100644 --- a/html/semantics/forms/the-select-element/customizable-select/selectedcontent-nested.html +++ b/html/semantics/forms/the-select-element/customizable-select/selectedcontent-nested.html @@ -5,9 +5,7 @@ @@ -15,7 +13,6 @@