mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-10 03:27:57 +00:00
refac
This commit is contained in:
parent
b6988ab2cc
commit
62f70a844e
1 changed files with 3 additions and 2 deletions
|
|
@ -290,8 +290,9 @@
|
|||
if (!(event.target instanceof Node)) return;
|
||||
if (triggerEl?.contains(event.target)) return;
|
||||
if (contentEl?.contains(event.target)) return;
|
||||
// Submenu content is portaled outside contentEl.
|
||||
if (event.target instanceof Element && event.target.closest('[role="menu"]')) return;
|
||||
// Submenus and listboxes can be portaled outside contentEl.
|
||||
if (event.target instanceof Element && event.target.closest('[role="menu"], [role="listbox"]'))
|
||||
return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
closeDropdown(false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue