mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-23 21:12:28 +08:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user