Skip to content

Commit 856b69e

Browse files
fix(core): optimize settings dialog's right-side content scroll position (#13236)
In the settings dialog, when switching between different setting items, the right-side content retains the previous scroll position. I think it would be better for the right side to return to the top every time a switch is made, so I submitted this PR. **before** https://github.com/user-attachments/assets/a2d10601-6173-41d3-8d68-6fbccc62aaa7 **after** https://github.com/user-attachments/assets/f240348b-e131-4703-8232-1a07e924162d <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Ensured the settings dialog always scrolls to the top when the settings state updates, improving user experience when navigating settings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: DarkSky <[email protected]>
1 parent 5fdae91 commit 856b69e

File tree

1 file changed

+1
-0
lines changed
  • packages/frontend/core/src/desktop/dialogs/setting

1 file changed

+1
-0
lines changed

packages/frontend/core/src/desktop/dialogs/setting/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ const SettingModalInner = ({
190190
}
191191
});
192192
}
193+
modalContentWrapperRef.current?.scrollTo({ top: 0 });
193194
}, [settingState]);
194195
return (
195196
<FrameworkScope scope={currentServer.scope}>

0 commit comments

Comments
 (0)