From 8047b00fb6b315bdeb86525cc05b447a8defcb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Lu=C3=ADs?= Date: Tue, 31 Jul 2018 20:24:16 +0100 Subject: [PATCH] Reapply "Merge branch '_acet-fix-mr-autosave' into 'master'" This reverts commit bd5b177b0fc48d77b5069b112faf36d151221be7. --- app/assets/javascripts/autosave.js | 4 ++ .../diffs/components/diff_line_note_form.vue | 31 ++++++++------ .../notes/components/note_form.vue | 2 +- .../notes/components/noteable_discussion.vue | 34 +++++++-------- .../javascripts/notes/mixins/autosave.js | 17 ++++++-- locale/gitlab.pot | 3 ++ spec/javascripts/autosave_spec.js | 10 ++--- .../components/diff_line_note_form_spec.js | 41 +++++++++++++++---- .../components/noteable_discussion_spec.js | 9 +++- 9 files changed, 101 insertions(+), 50 deletions(-) diff --git a/app/assets/javascripts/autosave.js b/app/assets/javascripts/autosave.js index fa00a3cf386..e8c59fab609 100644 --- a/app/assets/javascripts/autosave.js +++ b/app/assets/javascripts/autosave.js @@ -53,4 +53,8 @@ export default class Autosave { return window.localStorage.removeItem(this.key); } + + dispose() { + this.field.off('input'); + } } diff --git a/app/assets/javascripts/diffs/components/diff_line_note_form.vue b/app/assets/javascripts/diffs/components/diff_line_note_form.vue index 32f9516d332..cbe4551d06b 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -1,17 +1,17 @@