Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): prevent navbar clearing app state on cmd+click (#28935)

Lê Quốc Bìnha37497ffb50c
diff --git a/web/app/components/header/nav/index.tsx b/web/app/components/header/nav/index.tsx
index 3dfb77ca6ae..d9739192e39 100644
--- a/web/app/components/header/nav/index.tsx
+++ b/web/app/components/header/nav/index.tsx
@@ -52,7 +52,12 @@ const Nav = ({
`}>
<Link href={link + (linkLastSearchParams && `?${linkLastSearchParams}`)}>
<div
- onClick={() => setAppDetail()}
+ onClick={(e) => {
+ // Don't clear state if opening in new tab/window
+ if (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0)
+ return
+ setAppDetail()
+ }}
className={classNames(
'flex h-7 cursor-pointer items-center rounded-[10px] px-2.5',
isActivated ? 'text-components-main-nav-nav-button-text-active' : 'text-components-main-nav-nav-button-text',