aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-03 21:39:04 -0700
committerAdam Soltys <[email protected]>2026-09-03 21:39:04 -0700
commit6bfe57611b792ff3162de2e9e1a4e97240af8133 (patch)
treec0f311213b5ea80bdf849474aa06b7e4649fbab2 /src/app.js
parentebdb209ff4480ce88ee764c36b28b1b7d5890eed (diff)
downloadcoinosv3-6bfe57611b792ff3162de2e9e1a4e97240af8133.tar.gz
coinosv3-6bfe57611b792ff3162de2e9e1a4e97240af8133.zip
Two carousel polish fixes. The 'slight move after history loads' was the vertical scrollbar: a short page has none, the history list filling in makes the page tall enough to get one, the viewport narrows ~15px, and the snapped card re-centers into the narrower width — a horizontal nudge right as history lands. scrollbar-gutter:stable reserves the gutter so growing content never changes the width. And the 'false start' — a boot render's alignment firing a scrollTo mid-drag — is guarded: alignment now bails while a finger/mouse is down
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app.js b/src/app.js
index 4e4ab32..82cf537 100644
--- a/src/app.js
+++ b/src/app.js
@@ -3392,7 +3392,9 @@ function balanceCard() {
requestAnimationFrame(() => {
const el = document.querySelector('.bal-carousel');
if (!el || el._alignedTo === sel) return;
- if (Date.now() - (el._lastScroll || 0) < 350) return;
+ // never yank the card while a finger/mouse is on it, or right after a
+ // scroll — a boot render firing this mid-drag was the "false start"
+ if (el._dragging || Date.now() - (el._lastScroll || 0) < 350) return;
const k = el.children[ORDER2.indexOf(sel)];
if (!k) return;
const target = k.offsetLeft + k.offsetWidth / 2 - el.clientWidth / 2;