From 187807cfb1470cbe6c093c39f5cbfcf54508b4a7 Mon Sep 17 00:00:00 2001 From: "D. Berge" Date: Wed, 27 Apr 2022 19:45:26 +0200 Subject: [PATCH] Enable `Save` button as soon as the remarks are changed. Closes #199. --- lib/www/client/source/src/components/event-edit.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/www/client/source/src/components/event-edit.vue b/lib/www/client/source/src/components/event-edit.vue index c1f3c36..c59a0eb 100644 --- a/lib/www/client/source/src/components/event-edit.vue +++ b/lib/www/client/source/src/components/event-edit.vue @@ -384,6 +384,11 @@ export default { return true; } + // The user is editing the remarks + if (this.entryRemarksText != this.entryRemarksInput) { + return true; + } + // Selected label set distinct from input labels if (distinctSets(this.selectedLabels, this.entryLabels, (i) => i.text)) { return true; @@ -632,6 +637,12 @@ export default { }, save () { + // In case the focus goes directly from the remarks field + // to the Save button. + if (this.entryRemarksInput != this.entryRemarksText) { + this.entryRemarks = this.entryRemarksInput; + } + const data = { id: this.id, remarks: this.entryRemarksText,