From 856b69e1f660c01c6359a2d645486aef4b154163 Mon Sep 17 00:00:00 2001 From: Kieran Cui <78460423+cuikaipeng@users.noreply.github.com> Date: Wed, 1 Oct 2025 22:52:39 +0800 Subject: [PATCH] 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 ## 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. Co-authored-by: DarkSky <25152247+darkskygit@users.noreply.github.com> --- packages/frontend/core/src/desktop/dialogs/setting/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/core/src/desktop/dialogs/setting/index.tsx b/packages/frontend/core/src/desktop/dialogs/setting/index.tsx index 78eb30974d..419ac312e6 100644 --- a/packages/frontend/core/src/desktop/dialogs/setting/index.tsx +++ b/packages/frontend/core/src/desktop/dialogs/setting/index.tsx @@ -190,6 +190,7 @@ const SettingModalInner = ({ } }); } + modalContentWrapperRef.current?.scrollTo({ top: 0 }); }, [settingState]); return (