From 74da02da2c2d870555a6318a4242f369aaa8b1de Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Tue, 14 Sep 2021 12:25:31 +0800 Subject: [PATCH] Fix: Prevent enter in modal from submitting form --- src/components/TagsManager.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/TagsManager.vue b/src/components/TagsManager.vue index a4974350d..82025031c 100644 --- a/src/components/TagsManager.vue +++ b/src/components/TagsManager.vue @@ -53,7 +53,11 @@
- +
{{ $t("Tag with this name already exist.") }}
@@ -90,7 +94,11 @@
- +
{{ $t("Tag with this value already exist.") }}
@@ -308,6 +316,11 @@ export default { this.$root.getSocket().emit("deleteMonitorTag", tagId, monitorId, value, resolve); }); }, + onEnter() { + if (!this.validateDraftTag.invalid) { + this.addDraftTag(); + } + }, async submit(monitorId) { console.log(`Submitting tag changes for monitor ${monitorId}...`); this.processing = true;