From ce8cb5e7bcd37f06136cfe895ea9d1ec71736a50 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 20 Aug 2026 11:14:36 -0700 Subject: [PATCH] fix(environments): avoid opening dropdown with editor --- .../components/EnvironmentActionsDropdown.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/yaak-client/components/EnvironmentActionsDropdown.tsx b/apps/yaak-client/components/EnvironmentActionsDropdown.tsx index 268683e4..37e640e2 100644 --- a/apps/yaak-client/components/EnvironmentActionsDropdown.tsx +++ b/apps/yaak-client/components/EnvironmentActionsDropdown.tsx @@ -67,7 +67,14 @@ export const EnvironmentActionsDropdown = memo(function EnvironmentActionsDropdo )} // If no environments, the button simply opens the dialog. // NOTE: We don't create a new button because we want to reuse the hotkey from the menu items - onClick={subEnvironments.length === 0 ? () => editEnvironment(null) : undefined} + onClick={ + subEnvironments.length === 0 + ? (event) => { + event.preventDefault(); + editEnvironment(null); + } + : undefined + } {...buttonProps} >