Add form directory input on blur as well as enter; ensure valid though.

This commit is contained in:
Dannon Baker
2026-01-14 09:16:08 -05:00
parent 81ef5bff5f
commit a4cd192617
@@ -35,7 +35,8 @@
trim
@keyup.enter="addPath"
@keydown.191.capture.prevent.stop="addPath"
@keydown.8.capture="removeLastPath" />
@keydown.8.capture="removeLastPath"
@blur="handleBlur" />
</b-breadcrumb-item>
</b-breadcrumb>
@@ -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();
},
},
};
</script>