mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06: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:
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user