🛠️ fix(detail): disable automatic page scroll caused by Tabs focus

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.
This commit is contained in:
Apple\Apple
2025-06-18 04:36:12 +08:00
parent 3746482e8c
commit 3502730dfc

View File

@@ -1112,6 +1112,7 @@ const Detail = (props) => {
</div>
<Tabs
type="button"
preventScroll
activeKey={activeChartTab}
onChange={setActiveChartTab}
>
@@ -1388,6 +1389,7 @@ const Detail = (props) => {
) : (
<Tabs
type="card"
preventScroll
collapsible
activeKey={activeUptimeTab}
onChange={setActiveUptimeTab}