grain.social is a photo sharing platform built on atproto. grain.social
atproto photography appview
57
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: restore tap-to-navigate on stories after double-tap addition

Capture click position before the setTimeout since e.currentTarget
is null by the time the delayed callback fires.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+4 -3
+4 -3
app/lib/components/organisms/StoryViewer.svelte
··· 196 196 return 197 197 } 198 198 lastTapTime = now 199 + const rect = (e.currentTarget as HTMLElement).getBoundingClientRect() 200 + const x = e.clientX - rect.left 201 + const width = rect.width 199 202 setTimeout(() => { 200 203 if (lastTapTime === 0) return // was consumed by double tap 201 - const rect = (e.currentTarget as HTMLElement).getBoundingClientRect() 202 - const x = e.clientX - rect.left 203 - if (x < rect.width / 3) { 204 + if (x < width / 3) { 204 205 prev() 205 206 } else { 206 207 next()