From 2e0d064eab510f057fdf4c66372590d69d3d6941 Mon Sep 17 00:00:00 2001 From: ergosteur <1992147+ergosteur@users.noreply.github.com> Date: Fri, 14 Aug 2026 09:05:24 -0400 Subject: [PATCH] fix: keep post nav arrows outside the modal and stop scroll chaining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The prev/next arrows are fixed to the viewport edges while the modal grows to fill the available width, so below roughly 1200px the modal slid underneath them and a white chevron landed on the white caption panel — invisible until hovered. The overlay now reserves a horizontal gutter (md:px-16 lg:px-24) so the arrows always sit outside the modal, and they get a solid white pill with a dark chevron so they read against anything behind them. Verified clearing the modal at 768, 1024, 1440 and 1920px. The caption sidebar shrinks to w-80 at md so the narrower modal doesn't squeeze the media pane. Also adds overscroll-contain to the overlay: the wheel previously chained through to the post grid behind it, scrolling the background while a post was open. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_011uBWhwV3wFQ5MBCcMHHem7 --- package-lock.json | 4 ++-- package.json | 2 +- src/components/PostModal.tsx | 18 ++++++++++++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 227c5da..1845b76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "instaarchive-viewer", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "instaarchive-viewer", - "version": "1.3.2", + "version": "1.3.3", "dependencies": { "@tailwindcss/vite": "^4.1.14", "@vitejs/plugin-react": "^5.0.4", diff --git a/package.json b/package.json index 918e72c..a97bd35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "instaarchive-viewer", "private": true, - "version": "1.3.2", + "version": "1.3.3", "type": "module", "scripts": { "dev": "vite --port=3000 --host=0.0.0.0", diff --git a/src/components/PostModal.tsx b/src/components/PostModal.tsx index c309329..25cd976 100644 --- a/src/components/PostModal.tsx +++ b/src/components/PostModal.tsx @@ -97,12 +97,22 @@ export const PostModal: React.FC = ({ }; const swipePower = (offset: number, velocity: number) => Math.abs(offset) * velocity; + /* + * Horizontal padding on the overlay reserves a gutter for the prev/next + * arrows so they always sit *outside* the modal. Without it the modal grows + * until it sits under them and a white chevron lands on the white caption + * panel, leaving the control invisible until hovered. + * + * overscroll-contain stops wheel events chaining through to the very long + * post grid behind the overlay. + */ return ( - +
- {hasPrevPost && onPrevPost && } - {hasNextPost && onNextPost && } + {/* Solid pill so the arrows read against whatever sits behind them. */} + {hasPrevPost && onPrevPost && } + {hasNextPost && onNextPost && } { if (offset.y > 200 || velocity.y > 800) onClose(); }} className="bg-black flex flex-col md:flex-row w-full max-w-6xl h-auto md:rounded-sm overflow-hidden shadow-2xl relative text-black" onClick={e => e.stopPropagation()}>
@@ -138,7 +148,7 @@ export const PostModal: React.FC = ({ )}
-
+
{profilePic ? : {post.username[0]}}