diff --git a/client/components/modals/libraries/EditLibrary.vue b/client/components/modals/libraries/EditLibrary.vue
index 438926d57c..83f37ab72a 100644
--- a/client/components/modals/libraries/EditLibrary.vue
+++ b/client/components/modals/libraries/EditLibrary.vue
@@ -6,7 +6,7 @@
@@ -20,12 +20,12 @@
{{ $strings.LabelFolders }}
folder
-
+
close
folder
-
+
{{ $strings.ButtonBrowseForFolder }}
@@ -82,6 +82,19 @@ export default {
}
},
methods: {
+ checkBlurExpressionInput() {
+ if (this.$refs.nameInput) {
+ this.$refs.nameInput.blur()
+ }
+ if (this.$refs.folderInput && this.$refs.folderInput.length) {
+ this.$refs.folderInput.forEach((input) => {
+ if (input.blur) input.blur()
+ })
+ }
+ if (this.$refs.newFolderInput) {
+ this.$refs.newFolderInput.blur()
+ }
+ },
browseForFolder() {
this.showDirectoryPicker = true
},
diff --git a/client/components/modals/libraries/EditModal.vue b/client/components/modals/libraries/EditModal.vue
index c90d3050a1..f83ebf74c8 100644
--- a/client/components/modals/libraries/EditModal.vue
+++ b/client/components/modals/libraries/EditModal.vue
@@ -144,8 +144,6 @@ export default {
return true
},
submit() {
- if (!this.validate()) return
-
// If custom expression input is focused then unfocus it instead of submitting
if (this.$refs.tabComponent && this.$refs.tabComponent.checkBlurExpressionInput) {
if (this.$refs.tabComponent.checkBlurExpressionInput()) {
@@ -153,6 +151,8 @@ export default {
}
}
+ if (!this.validate()) return
+
if (this.library) {
this.submitUpdateLibrary()
} else {