Default behavior for input click (radio / checkbox).

This wasn't 100% intuitive to me. At the start of the event, the input is
immediately toggled. But at any point during dispatching, the default behavior
can be suppressed. So the state of the input's check during dispatching captures
the "intent" of the click. But it's possible for one listener to see that
input.checked == true even though, by the end of dispatching, input.checked ==
false because some other listener called preventDefault().

To support this, we need to capture the "current" state so that, if we need to
rollback, we can. For radio buttons, this "current" state includes capturing
the currently checked radio (if any).
This commit is contained in:
Karl Seguin
2026-02-13 11:06:46 +08:00
parent 0cae6ceca3
commit 6037521c49
4 changed files with 448 additions and 8 deletions

View File

@@ -1255,7 +1255,6 @@ pub const Transfer = struct {
client.endTransfer(self);
}
self.deinit();
}
pub fn terminate(self: *Transfer) void {