diff --git a/client/src/components/Form/Elements/FormDirectory.vue b/client/src/components/Form/Elements/FormDirectory.vue index 4040d5d5241..29f12722a3f 100644 --- a/client/src/components/Form/Elements/FormDirectory.vue +++ b/client/src/components/Form/Elements/FormDirectory.vue @@ -35,7 +35,8 @@ trim @keyup.enter="addPath" @keydown.191.capture.prevent.stop="addPath" - @keydown.8.capture="removeLastPath" /> + @keydown.8.capture="removeLastPath" + @blur="handleBlur" /> @@ -158,6 +159,14 @@ export default { } this.$emit("input", url); }, + handleBlur() { + if (this.currentDirectoryName && this.isValidName) { + const newFolder = this.currentDirectoryName; + this.pathChunks.push({ pathChunk: newFolder, editable: true }); + this.currentDirectoryName = ""; + } + this.updateURL(); + }, }, };