From 4cc630e808c05348afa1b438e8e799df739dbaed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 12 Jun 2020 22:06:48 +0200 Subject: [PATCH] Fix autosave on blur/card change and trigger easymde rerendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/card/CardSidebar.vue | 31 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 0dcaec879..0f0a65900 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -152,10 +152,12 @@ @click="clickedPreview" v-html="renderedDescription" /> + @input="updateDescription" + @blur="saveDescription" /> { - if (!Object.prototype.hasOwnProperty.call(this.copiedCard, 'descriptionLastEdit') || this.descriptionSaving) { - return - } - this.descriptionSaving = true - await this.$store.dispatch('updateCardDesc', this.copiedCard) - delete this.copiedCard.descriptionLastEdit - this.descriptionSaving = false + await this.saveDescription() }, 2500) - }, closeSidebar() {