Просмотр исходного кода

HANDOFF.md: note stepper close via direct listeners on Phase 17

Annotates Phase 17 in §9 Shipped with direct-listeners fix `e93df6b`.
Describes the shared failure mode of all prior close strategies
(document-level event delegation — pointermove, capture-phase
pointerdown, pointerleave on document, focusout — whatever was
suppressing those events suppressed all of them at once), and the new
strategy: element-local pointerenter/pointerleave listeners attached
directly to the popover and the bound input. Outside-click keeps
capture-phase document pointerdown with a 50 ms OPEN_IGNORE_MS
guard. SHA appended to §13 git history.

No code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
achiappa 2 недель назад
Родитель
Сommit
761c4ddc05
1 измененных файлов с 23 добавлено и 1 удалено
  1. 23 1
      HANDOFF.md

+ 23 - 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`, rebuild `ff807c2`). Three classes of number input —
+      for number inputs** (`b457896`, UX tweak `c07af1c`, hotfix `832b256`, rewrite `15b2d24`, blur-fix `f189ef7`, close-fix `8d79f96`, rebuild `ff807c2`, direct-listeners `e93df6b`). 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
@@ -564,6 +564,26 @@ with a `BOOTSTRAP_ADMIN` audit row.
       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.
+      **Direct-listeners `e93df6b`**: even after the rebuild the
+      close logic still didn't fire reliably — every close path was
+      routed through document-level delegation (pointermove tracker,
+      capture-phase pointerdown, pointerleave on document), and
+      whatever was silently suppressing those events on the user's
+      page suppressed all of them at once, leaving the popup
+      stranded. Swapped the mouse-tracking close paths to
+      **element-local** `pointerenter` / `pointerleave` listeners
+      attached directly to the two elements that matter — the
+      popover (once, in `build()`) and the bound input (per-open
+      via `bindInput()`, detached via `unbindInput()` on close or
+      rebind). `pointerleave` on either schedules close; `pointerenter`
+      on either cancels it; the 300 ms open-grace keeps the timer
+      rescheduling itself during the first 300 ms after click-to-
+      open. Outside-click keeps the capture-phase document
+      `pointerdown`, now with a 50 ms `OPEN_IGNORE_MS` guard so the
+      opening click can't be misread as an outside click. Removed
+      the document-level pointermove tracker, the document-level
+      pointerleave viewport-exit handler, and the focusout handler
+      entirely — superseded.
 
 ### Upcoming
 
@@ -647,6 +667,8 @@ before acting — nothing here is load-bearing once it grows stale.
 ## 13. Git history (as of this handoff)
 
 ```
+e93df6b Fix: stepper close via direct element listeners (not doc delegation)
+ac6ae73 HANDOFF.md: note number-stepper rebuild on Phase 17
 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)