From c87bc78d5d4e29589b7391d0f0080d98bd5cb264 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Sun, 5 Jan 2025 20:47:05 +0000 Subject: [PATCH] LibWeb: Preserve `indeterminate` value when cloning `HTMLInputElement` --- Libraries/LibWeb/HTML/HTMLInputElement.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 0fa90bb2c2b..369c980f9fd 100644 --- a/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -1721,6 +1721,10 @@ WebIDL::ExceptionOr HTMLInputElement::cloned(DOM::Node& copy, bool subtree input_clone.m_dirty_value = m_dirty_value; input_clone.m_checked = m_checked; input_clone.m_dirty_checkedness = m_dirty_checkedness; + + // AD-HOC: The spec doesn't mention propagating this state, but there is a WPT test that expects cloned nodes to preserve it. + input_clone.m_indeterminate = m_indeterminate; + return {}; }