Skip to content

fix(charts): zoom drag after Escape, after a lost release, and its label at the plot's edge - #2575

Merged
Makisuo merged 3 commits into
mainfrom
fix/chart-zoom-missed-release
Nov 13, 2026
Merged

Makisuo merged 3 commits into
mainfrom
fix/chart-zoom-missed-release

fix(charts): a cancelled drag keeps its release, and its label stays …

bece67a
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 13, 2026 in 1m 43s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. Each of the three gesture fixes is pinned by a DOM test that fails without it; only the label's px placement rests on the labelLeft unit test, since happy-dom has no layout.
no findings · tests covered · risk medium

Fixes three drag-gesture defects in the linked zoom: Escape now keeps the drag so its trailing click is swallowed, a lost pointerup ends the drag, and the label is clamped inside the plot. Safe to merge.

  • cancel() marks the drag cancelled and keeps it until its release
  • onDragMove drops a drag whose event.buttons has no primary button
  • The label leaves the band and labelLeft holds it inside the plot
  • Eight DOM tests for the gesture in linked-cursor.dom.test.ts
What was checked
  • Cancelled drags still set state.dragEndedAt (linked-cursor.ts:367), so the click after an Escape is swallowed like any other
  • A missed release leaves nothing stuck: drop() clears band and label, and onPointerMove re-shows the cursor on the same event
  • New tests run: the src/**/*.test.ts include matches linked-cursor.dom.test.ts, and happy-dom is a @maple/views devDependency

bece67a · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.