Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCloning a form doesn't preserve changed values of its HTMLInputElement children. #25385
Comments
|
Node::clone's handling of elements doesn't include the concept of "cloning steps" (ie. step 5 of the algorithm), which includes specific steps for input elements (https://html.spec.whatwg.org/multipage/input.html#the-input-element%3Aconcept-node-clone-ext). servo/components/script/dom/node.rs Lines 2146 to 2160 in 8002c6b We should probably extend the VirtualMethods trait to incorporate cloning steps. |
|
servo/components/script/dom/node.rs Lines 2196 to 2197 in 44b3e8b It suffices to implement @highfive assign me |
|
Hey @teapotd! Thanks for your interest in working on this issue. It's now assigned to you! |
Implement HTMLInputElement cloning steps This change adds missing [cloning steps for input elements](https://html.spec.whatwg.org/multipage/#the-input-element%3Aconcept-node-clone-ext). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25385 - [X] There are tests for these changes
Implement HTMLInputElement cloning steps This change adds missing [cloning steps for input elements](https://html.spec.whatwg.org/multipage/#the-input-element%3Aconcept-node-clone-ext). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25385 - [X] There are tests for these changes
Implement HTMLInputElement cloning steps This change adds missing [cloning steps for input elements](https://html.spec.whatwg.org/multipage/#the-input-element%3Aconcept-node-clone-ext). --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25385 - [X] There are tests for these changes
WPT html/semantics/forms/the-input-element/clone.html has a form with
valueandcheckedcontent attributes on many input children. It sets .value on the children, then calls cloneNode on the form. It gets back a clone, but the clone's children's values match the original values from their content attributes, not the updated values that were set by the script.