mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-24 14:30:20 -05:00
fix: first click in a dialog opened from a menu does nothing (#31496)
The chat header menu, the folder menu, the note menu, the knowledge Add Content and folder row menus and the Actions menus in Models, Archived Chats and Personalization stayed open behind the dialog they opened, so the first click inside that dialog only closed the menu. These menus now close when an item is picked, like the sidebar chat menu. The note menu's Formatting switch, the chat tags and submenus such as Download still keep the menu open. Fixes #31493
This commit is contained in:
1 parent
b6f9679985
commit
ef67cc3fac
8 files changed
+12
-12
No files matched your search
@@ -26,6 +26,7 @@
|
||||
</script>
|
||||
|
||||
<Dropdown
|
||||
closeOnSelect
|
||||
bind:show
|
||||
onOpenChange={(state) => {
|
||||
if (state === false) {
|
||||
@@ -62,7 +63,6 @@
|
||||
class="select-none flex h-[1.6875rem] w-full cursor-pointer items-center gap-2 rounded-xl bg-transparent px-2 text-xs hover:text-gray-900 dark:hover:text-gray-100"
|
||||
on:click={() => {
|
||||
onUpload({ type: 'new_directory' });
|
||||
show = false;
|
||||
}}
|
||||
>
|
||||
<NewFolderAlt />
|
||||
@@ -134,7 +134,6 @@
|
||||
class="select-none flex h-[1.6875rem] w-full cursor-pointer items-center gap-2 rounded-xl bg-transparent px-2 text-xs hover:text-gray-900 dark:hover:text-gray-100"
|
||||
on:click={() => {
|
||||
onReset();
|
||||
show = false;
|
||||
}}
|
||||
>
|
||||
<ArrowUturnLeft strokeWidth="2" />
|
||||
|
||||
@@ -34,12 +34,10 @@
|
||||
let editName = '';
|
||||
let editInput: HTMLInputElement;
|
||||
let dragOver = false;
|
||||
let showDropdown = false;
|
||||
|
||||
const startRename = () => {
|
||||
editName = directory.name;
|
||||
editing = true;
|
||||
showDropdown = false;
|
||||
setTimeout(() => editInput?.select(), 0);
|
||||
};
|
||||
|
||||
@@ -163,7 +161,7 @@
|
||||
|
||||
{#if writeAccess}
|
||||
<div class="flex items-center">
|
||||
<Dropdown bind:show={showDropdown} align="end" sideOffset={4}>
|
||||
<Dropdown closeOnSelect align="end" sideOffset={4}>
|
||||
<button
|
||||
class="p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-850 transition"
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user