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:
G30
2026-10-10 10:29:03 +04:00
committed by GitHub
parent c65ce18a9a
commit f6901e75c4
@@ -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" />