mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-29 06:32:52 +00:00
fix: only one model's More menu stays open in the model picker (#33020)
This commit is contained in:
parent
4e02a7d26a
commit
fa629e5ca5
1 changed files with 5 additions and 2 deletions
|
|
@ -315,8 +315,11 @@
|
|||
if (triggerEl?.contains(event.target)) return;
|
||||
if (contentEl?.contains(event.target)) return;
|
||||
// Submenus and listboxes can be portaled outside contentEl.
|
||||
if (event.target instanceof Element && event.target.closest('[role="menu"], [role="listbox"]'))
|
||||
return;
|
||||
const portaled =
|
||||
event.target instanceof Element
|
||||
? event.target.closest('[role="menu"], [role="listbox"]')
|
||||
: null;
|
||||
if (portaled && !portaled.contains(triggerEl)) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
closeDropdown(false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue