From ba6b0637cc93bc8c301e64f8e509c339ed6e8328 Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Wed, 18 Jun 2025 05:10:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(detail):=20explicitly=20set?= =?UTF-8?q?=20`preventScroll=3D{true}`=20on=20Tabs=20to=20stop=20page=20ju?= =?UTF-8?q?mp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem Semi UI’s Tabs calls `focus()` on the active tab during mount, causing the browser to scroll the page to that element. Using the bare `preventScroll` shorthand was not picked up reliably, so the page still jumped to the Tabs’ position on first render. Changes • Updated both Tabs instances in `web/src/pages/Detail/index.js` to `preventScroll={true}` instead of the shorthand prop. • Ensures the prop is explicitly interpreted as boolean `true`, converting the internal call to `focus({ preventScroll: true })`. Result The `Detail` page now stays at its original scroll position after load, eliminating the unexpected auto-scroll behavior. --- web/src/pages/Detail/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/Detail/index.js b/web/src/pages/Detail/index.js index b4bd9b7f..15c02abf 100644 --- a/web/src/pages/Detail/index.js +++ b/web/src/pages/Detail/index.js @@ -1112,7 +1112,7 @@ const Detail = (props) => { @@ -1389,7 +1389,7 @@ const Detail = (props) => { ) : (