Widen the edge-tab tap target, split scroll from reposition #9
Reference in New Issue
Block a user
Delete Branch "userscript-edge-tab-hitbox"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The 7px edge tab is well below a usable touch target on a phone. This widens
only its hit area — the visible sliver still measures exactly 7 × 44 and
offsetWidth/offsetHeightstill report it, soplaceFab,applyFabPosandthe edge-snap maths are untouched.
#hitchild extends the tappable box inward to28 × 72.overflow: hiddenhad to go (it would clip#hit), so the rounded-cornerclip for the dwell-progress fill moves onto
#fillviaborder-radius: inherit.touch-actionis resolved by the browser at gesture start, so the stripcannot be both browser-scrolled and script-dragged.
#fabkeepstouch-action: none, owns every gesture, andmakeDraggablesplits byintent: a plain swipe from
#hitscrolls the page viawindow.scrollBy, a~400ms hold arms a reposition drag (tab brightens and grows a ring), and the
visible sliver still drags immediately with no hold.
pointercancelreset, and snaps + saves oncancel so an OS-claimed gesture (Android's swipe-back starts in exactly this
screen region) cannot strand the tab mid-screen.
dataset.draggedon pointerdown, so a scroll or drag thatproduces no trailing click cannot swallow the next tap.
Testing
node --checkclean,node --test userscript/test/logic.test.js14/14 pass.The gesture code has no unit test —
logic.test.jsruns under node with no DOMand this branch deliberately does not add a DOM harness. Manual device checks
(tap / swipe-to-scroll / hold-to-arm / sliver-drag on a chapter page) are the
real verification and are pending.
Known ceilings
is the scroller rather than a nested container. Flagged in a
ponytail:comment with the upgrade path.
pointerId, so a second finger corrupts anin-progress gesture. Pre-existing, not a regression.
the sliver never needs a hold. Cosmetic only.
🤖 Generated with Claude Code