diff --git a/Changelog.md b/Changelog.md index 04a910a63..41365fd05 100644 --- a/Changelog.md +++ b/Changelog.md @@ -67,7 +67,7 @@ - 优化连接、规则和日志筛选:切换页面后保留过滤条件 - 优化全局模式代理列表:仅显示 `GLOBAL` 节点,选中其中的策略组时才显示该组 - 优化设置页开关和选项所在行的鼠标悬停高亮,便于对应说明与控件 -- 优化首页「当前节点」卡片:按规则指向的代理组逐级显示和切换实际生效的节点 +- 优化首页「当前节点」卡片:按规则指向的代理组逐级显示和切换实际生效的节点,选中后下拉菜单自动收起 **🍎 macOS** diff --git a/src/components/home/current-proxy-card.tsx b/src/components/home/current-proxy-card.tsx index a79cec8ae..bde3be14c 100644 --- a/src/components/home/current-proxy-card.tsx +++ b/src/components/home/current-proxy-card.tsx @@ -443,6 +443,13 @@ const PersistentSelect = ({ role="listbox" aria-labelledby={labelId} variant="selectedMenu" + onClick={(event) => { + // A disabled option passes its click to the list itself. + if (!(event.target as Element).closest('[role="option"]')) + return + onOpenChange(false) + anchorRef.current?.focus({ preventScroll: true }) + }} > {open && renderOptions()}