Bladeren bron

HANDOFF.md: note number-stepper rebuild on Phase 17

Annotates Phase 17 in §9 Shipped with rebuild `ff807c2` — the seventh
iteration of the stepper, this time a ground-up rewrite. Describes
what was thrown out (hover / click / enter-latch / position-tracker /
focusout / Tab-keydown plumbing all layered on top of one another,
with the side effect of no longer closing reliably, silently stealing
focus on slider click, and not following the input on page scroll),
and what the new single-IIFE file does: open (click / focusin + slider
configure + position), slider-to-input sync (one input listener
dispatching bubbling input+change), close (pointer-off-both-rects
>200ms past 300ms grace / viewport exit / capture-phase outside-
pointerdown / Escape), and scroll anchoring (window scroll/resize
listeners, rAF-throttled, capture=true so ancestor scrolls are caught).
CSS look/style untouched. SHA appended to §13 git history.

No code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
achiappa 2 weken geleden
bovenliggende
commit
ac6ae732a3
1 gewijzigde bestanden met toevoegingen van 25 en 1 verwijderingen
  1. 25 1
      HANDOFF.md

+ 25 - 1
HANDOFF.md

@@ -422,7 +422,7 @@ with a `BOOTSTRAP_ADMIN` audit row.
       localStorage denial fallback).
 
 - [x] **Phase 17 — Hide native number spinners + custom slider popover
-      for number inputs** (`b457896`, UX tweak `c07af1c`, hotfix `832b256`, rewrite `15b2d24`, blur-fix `f189ef7`, close-fix `8d79f96`). Three classes of number input —
+      for number inputs** (`b457896`, UX tweak `c07af1c`, hotfix `832b256`, rewrite `15b2d24`, blur-fix `f189ef7`, close-fix `8d79f96`, rebuild `ff807c2`). Three classes of number input —
       day cells, RTB cells, task assignment cells — deal in half-day
       increments (or 0.05 for RTB). Browsers rendered each as
       `<input type="number">` with tiny native up/down spinner
@@ -542,6 +542,28 @@ with a `BOOTSTRAP_ADMIN` audit row.
       viewport-exit `pointerleave` on `document` is also a close
       trigger — the pointer heading for the browser chrome
       shouldn't leave the popup behind.
+      **Rebuild `ff807c2`**: after seven iterations the file had
+      accumulated contradictory event plumbing (hover-to-open
+      co-existing with click-to-open, two close latches, two outside-
+      click paths, stopPropagation on the popover's own pointerdown)
+      and still failed in practice — the popup wouldn't close on
+      drift or outside click, slider clicks sometimes stole focus
+      without mutating the value, and the popup didn't follow the
+      input on page scroll. Threw the file out and rebuilt it from
+      scratch as a single ~250-line IIFE with exactly four concerns:
+      open (`click` / `focusin` → configure slider + position),
+      slider-to-input sync (one `input` listener mirrors
+      `elRange.value` → `boundInput.value` and dispatches bubbling
+      `input`+`change` events), close (pointer off both rects > 200 ms
+      past a 300 ms open-grace window / viewport exit / capture-phase
+      outside-pointerdown / Escape — all testing live
+      `getBoundingClientRect` so repositioned popovers don't leave
+      stale hit rects), and **scroll anchoring**
+      (`window.addEventListener('scroll', fn, {capture:true})` plus
+      `resize`, rAF-throttled reposition; closes if the bound input
+      collapses to 0×0). The CSS was untouched — the visual style is
+      identical. Kept the ArrowUp/Down keyboard-nudge bonus that
+      replaces the spinner-arrow shortcut.
 
 ### Upcoming
 
@@ -625,6 +647,8 @@ before acting — nothing here is load-bearing once it grows stale.
 ## 13. Git history (as of this handoff)
 
 ```
+ff807c2 Rewrite: number-stepper popover from scratch
+729617d HANDOFF.md: note stepper close-fix (pointer-drift + capture-click)
 8d79f96 Fix: stepper popover closes on mouse-drift + outside-click (belt-and-braces)
 9de4bf2 HANDOFF.md: note stepper blur-close fix on Phase 17
 f189ef7 Fix: stepper popover now closes when the bound input loses focus