Repository navigation
🐛 fix(hero): reset swipe start on pointercancel and ignore mouse pointerup - #259
Conversation
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Read the hero swipe handlers at the PR head (index.html:815-834) and ran the suite locally: looks correct to me.
index.html:820-823— newpointercancellistener nullspointerStartX/Y. Browsers do not deliverpointerupfor a cancelled pointer, so before this the start from a scroll-cancelled touch survived until the nextpointerupof any pointer; that is the phantom-swipe path, and this closes it.index.html:825—pointerupnow early-returns forpointerType === 'mouse', mirroring the existing guard atindex.html:816inpointerdown. Pen/touch still navigate.scripts/carousels.test.mjs:503-516— the new test fails onmain(verified:✖ hero swipe: pointercancel clears…) and passes on this head; all 741 tests pass includingpage-csp.test.mjs, so the refreshed inline-script hash atindex.html:5matches.
Scope matches #258; no unrelated changes. Nothing for a human to decide here beyond merging.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Summary
The hero carousel kept the touch swipe start (
pointerStartX/Y) after apointercancel(e.g. vertical scroll), andpointerupdid not ignore mouse pointers, so a later mouse click consumed the stale start as a phantom swipe. Added apointercancellistener that clears the start, and a mouse guard at the top ofpointerupmirroringpointerdown.Closes #258
Validation
Tests added to
scripts/carousels.test.mjs; inline-script CSP hash refreshed inindex.html. Not run locally, CI is the verdict.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88