Преглед изворни кода

🐛 fix(detail): explicitly set `preventScroll={true}` on Tabs to stop page jump

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.
Apple\Apple пре 8 месеци
родитељ
комит
ba6b0637cc
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      web/src/pages/Detail/index.js

+ 2 - 2
web/src/pages/Detail/index.js

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