From ec3f5077e1aa1a95e74c94d9bec1febdc330a44d Mon Sep 17 00:00:00 2001 From: theetherGit Date: Thu, 26 Nov 2026 20:23:15 +0530 Subject: [PATCH 1/4] A box that clips its overflow clips clicks too (blitz-dom patch 14) In the counter example, scrolling the list a little made "start timer" stop working: the click selected a row instead. Blitz tests a node's descendants in its scrolled coordinates, where a point above a list scrolled down by 40 px counts as inside it, and it does not clip the descent to the box. The rows scrolled out of the top of the list, which the list does not draw there, sat under the buttons and took their clicks. Text overflowing an overflow: hidden box took clicks outside it the same way (SvelteKit's route announcer). hit_inner now asks whether the element clips its descendants, as blitz-paint decides it (overflow other than visible on either axis, or paint containment; never the root element), and outside its padding box hits nothing inside it: the element itself on its border, nothing otherwise. Marked `sepal patch`, written up in PATCH.md. Tests that clicked rows far below the window relied on the old behaviour. SvelteDocument::scroll_into_view scrolls a node to the middle of its boxes and tells the app, as scrollIntoView({ block: 'center' }) does; the Tracker's click() calls it when its target is not under the pointer, as a user would scroll to it. Three list tests scroll back to the top after clicking "Show more" or "Show all" at the end of the list, and the comment field, which a toast partly covers once the pane is scrolled to it, is clicked at its left end. A counter test scrolls the list and clicks "start timer"; it failed before. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 5 +++ CLAUDE.md | 19 +++++----- HANDOVER.md | 12 ++++--- crates/blitz-dom/PATCH.md | 22 ++++++++++-- crates/blitz-dom/src/node/node.rs | 60 +++++++++++++++++++++++++++++++ crates/host/Cargo.toml | 2 +- crates/host/src/document.rs | 22 ++++++++++++ crates/host/tests/counter.rs | 22 ++++++++++++ crates/host/tests/tracker/list.rs | 11 +++++- crates/host/tests/tracker/main.rs | 31 ++++++++++++++++ 10 files changed, 189 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 039e2fc..1510e56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,11 @@ Also: - **Selectors that end in a tag do not walk the page** in the DOM layer, and URL parses are cached: SvelteKit's split build looks for `meta[property=csp-nonce]` several times a navigation. +- **A list scrolled down no longer takes clicks meant for what is above + it.** Rows scrolled out of the top of a scroll box were still hit where + they would have been, under the buttons drawn there; in the counter + example "start timer" stopped working once the list was scrolled a little. + A box that clips its overflow now clips clicks too (a Blitz patch). - **A crash when an element came and went within one turn is fixed.** A form control, `