Skip to content

Commit 09b1e17

Browse files
authored
Skip rename operation on focus lost. (#6052)
When renaming a workflow through the breadcrumb bar. It is intended to complete the rename operation if the user clicks away from the text input. However, completing the text input by pressing enter can cause the rename operation to occur twice: On pressing enter and on loss of focus. When this occurs, the second rename causes, an error to be raised because renaming a workflow to the same name is not allowed. Worse, a user should be able to cancel a rename by pressing escape, but this still causes the "loss of focus" event to fire and rename the workflow anyways. As a simple fix to both of these, this PR disables rename on loss of focus. A rename only occurs when the user completes a rename operation with the enter key. Resolves #6051 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6052-Skip-rename-operation-on-focus-lost-28c6d73d3650815d9a5fecd8567d4299) by [Unito](https://www.unito.io)
1 parent 6443070 commit 09b1e17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/breadcrumb/SubgraphBreadcrumbItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ref="itemInputRef"
3939
v-model="itemLabel"
4040
class="fixed z-10000 px-2 py-2 text-[.8rem]"
41-
@blur="inputBlur(true)"
41+
@blur="inputBlur(false)"
4242
@click.stop
4343
@keydown.enter="inputBlur(true)"
4444
@keydown.esc="inputBlur(false)"

0 commit comments

Comments
 (0)