From fc9f9575e2cea830da1f2f1efccd73a49b43a26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Almeida?= Date: Fri, 16 Oct 2026 09:04:26 +0000 Subject: [PATCH] fix(editor): Keep workflow name in edit mode after Rename menu action (#41120) Co-authored-by: Claude Opus 5.5 --- .../components/MainHeader/ActionsDropdownMenu.vue | 2 ++ .../components/MainHeader/WorkflowDetails.test.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/packages/frontend/editor-ui/src/app/components/MainHeader/ActionsDropdownMenu.vue b/packages/frontend/editor-ui/src/app/components/MainHeader/ActionsDropdownMenu.vue index 3bf7a6bee7b..95adbbbaf1a 100644 --- a/packages/frontend/editor-ui/src/app/components/MainHeader/ActionsDropdownMenu.vue +++ b/packages/frontend/editor-ui/src/app/components/MainHeader/ActionsDropdownMenu.vue @@ -203,6 +203,8 @@ const workflowMenuItems = computed(() => { label: locale.baseText('generic.rename'), icon: { type: 'icon', value: 'pencil' }, disabled: props.workflowPermissions.update !== true, + // Focus moves to the name input; returning it to the trigger blurs and ends the edit. + suppressCloseAutoFocus: true, }); } diff --git a/packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowDetails.test.ts b/packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowDetails.test.ts index 784095f9005..a688eebb382 100644 --- a/packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowDetails.test.ts +++ b/packages/frontend/editor-ui/src/app/components/MainHeader/WorkflowDetails.test.ts @@ -292,6 +292,21 @@ describe('WorkflowDetails', () => { }); describe('Workflow menu', () => { + it('should keep the name input in edit mode after the rename action', async () => { + workflowDocumentStoreRef.value?.setScopes(['workflow:update']); + const { getByTestId, queryByTestId } = renderComponent({ + props: { ...defaultProps }, + }); + + await userEvent.click(getByTestId('workflow-menu')); + await userEvent.click(getByTestId('workflow-menu-item-rename')); + + await vi.waitFor(() => + expect(queryByTestId('workflow-menu-item-rename')).not.toBeInTheDocument(), + ); + expect(getByTestId('inline-edit-input')).toHaveFocus(); + }); + it('should not show a dependencies entry when the workflow has none', async () => { workflowDocumentStoreRef.value?.setScopes(['workflow:read']); const { getByTestId, queryByTestId } = renderComponent({