From 08d3dfeeb18335af7f201b1b5ead010ce36cb3ff Mon Sep 17 00:00:00 2001 From: meh Date: Sun, 6 Sep 2026 17:06:47 +0700 Subject: [PATCH 01/15] fix(dom): activate a checkbox before its click is dispatched A click's pre-click activation steps set a checkbox or radio's checkedness *before* the event is dispatched, so every listener sees the value the press produced. Blitz did it afterwards, as part of the default action, which handed `click` listeners the value from before the press. A control that reads `event.currentTarget.checked` -- the ordinary way to read a checkbox -- therefore acted on stale state and responded to every second press. The toggle moves into `run_pre_click_activation`, run by the event driver before the click is dispatched and undone by the canceled activation steps when a listener calls `preventDefault()`. `handle_click` keeps the post-click half: it reports the value with an `input` event, from which `change` is synthesised. A `