fix(home): close the node card dropdowns after a pick

The delay test button still keeps an open list open.
This commit is contained in:
wonfen
2026-11-21 01:55:01 +08:00
parent 498648cca0
commit 68ecad4ef7
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
- 优化连接、规则和日志筛选:切换页面后保留过滤条件
- 优化全局模式代理列表:仅显示 `GLOBAL` 节点,选中其中的策略组时才显示该组
- 优化设置页开关和选项所在行的鼠标悬停高亮,便于对应说明与控件
- 优化首页「当前节点」卡片:按规则指向的代理组逐级显示和切换实际生效的节点
- 优化首页「当前节点」卡片:按规则指向的代理组逐级显示和切换实际生效的节点,选中后下拉菜单自动收起
**🍎 macOS**
@@ -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()}
</MenuList>