From 3502730dfc4bfa903d12987837051f301806c1d4 Mon Sep 17 00:00:00 2001 From: "Apple\\Apple" Date: Wed, 18 Jun 2025 04:36:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20fix(detail):=20disable?= =?UTF-8?q?=20automatic=20page=20scroll=20caused=20by=20Tabs=20focus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initial render of the `Detail` page was jumping to the first `Tabs` component because Semi UI calls `focus()` on the active tab, which triggers the browser’s default scroll-into-view behavior. Changes made • Added `preventScroll` to the chart-selector `Tabs` (type="button"). • Added `preventScroll` to the uptime-monitor `Tabs` (type="card"). These flags convert the internal `focus()` call to `focus({ preventScroll: true })`, allowing the page to stay at its current position after load. No functional logic is changed other than disabling the unwanted scroll; UI and user interactions remain the same. --- web/src/pages/Detail/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/pages/Detail/index.js b/web/src/pages/Detail/index.js index 0fd18d16..b4bd9b7f 100644 --- a/web/src/pages/Detail/index.js +++ b/web/src/pages/Detail/index.js @@ -1112,6 +1112,7 @@ const Detail = (props) => { @@ -1388,6 +1389,7 @@ const Detail = (props) => { ) : (