mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-11 03:38:02 +00:00
fix: picking create from the create menu no longer reloads the app (#32152)
The create menu's content is moved to document.body by Dropdown, which puts its Create link outside the element where SvelteKit handles link clicks, so the browser followed the link as a full page load. A plain click now prevents the default and navigates with goto, the same way the Create button and the user menu links do; modified clicks still open the link in a new tab or window.
This commit is contained in:
parent
c65ce18a9a
commit
f6901e75c4
1 changed files with 4 additions and 1 deletions
|
|
@ -86,8 +86,11 @@
|
|||
{#if action.href}
|
||||
<a
|
||||
href={action.href}
|
||||
on:click={() => {
|
||||
on:click={(e) => {
|
||||
showMenu = false;
|
||||
if (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1) return;
|
||||
e.preventDefault();
|
||||
runAction(action);
|
||||
}}
|
||||
>
|
||||
<Icon className="size-3.5" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue