Skip to content

Commit

Permalink
Fix: #381
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyChen777 committed Feb 26, 2024
1 parent 95720c9 commit d10ea33
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/renderer/ui/sidebar-view/components/tree/item-row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const onEditSubmit = (e: Event) => {
emits("event:submit-name-editing", selfName.value);
}
};
const onFocused = () => {
PLMainAPI.menuService.disableAll();
};
const onBlured = () => {
PLMainAPI.menuService.enableAll();
emits("event:blur-name-editing");
};
</script>

<template>
Expand Down Expand Up @@ -80,7 +89,8 @@ const onEditSubmit = (e: Event) => {
autofocus
v-model="selfName"
v-else
@blur="emits('event:blur-name-editing')"
@focus="onFocused"
@blur="onBlured"
@keydown.enter="(e) => onEditSubmit(e)"
/>
</div>
Expand Down

0 comments on commit d10ea33

Please sign in to comment.