mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-12 12:01:52 +00:00
LibWeb: Don't group radio buttons from different trees together
Previously, we were searching for other radio buttons from the document root, rather than the element root.
This commit is contained in:
parent
a7578164d4
commit
67981af276
Notes:
github-actions[bot]
2024-09-11 06:00:20 +00:00
Author: https://github.com/tcl3
Commit: 67981af276
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1366
3 changed files with 31 additions and 3 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const container = document.createElement("div");
|
||||
container.innerHTML =
|
||||
`<form>
|
||||
<input type="radio" name="group1" id="radio1" checked>
|
||||
<input type="radio" name="group1" id="radio2">
|
||||
</form>`;
|
||||
|
||||
const radio1 = container.querySelector("#radio1");
|
||||
const radio2 = container.querySelector("#radio2");
|
||||
|
||||
println(`Radio button 1 initial checkedness: ${radio1.checked}`);
|
||||
println(`Radio button 2 initial checkedness: ${radio2.checked}`);
|
||||
|
||||
radio2.checked = true;
|
||||
|
||||
println(`Radio button 1 checkedness: ${radio1.checked}`);
|
||||
println(`Radio button 2 checkedness: ${radio2.checked}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue