From ddb888297ea8c12a6847b35188780bd29a2e3393 Mon Sep 17 00:00:00 2001 From: BrokenEagle Date: Sat, 28 Mar 2020 21:04:53 +0000 Subject: [PATCH] Fix movable status not being removed after the note has been saved This was also causing the movable status on new notes to require clicking twice to remove that status since the note ID gets changed but the move ID wasn't. --- app/javascript/src/javascripts/notes.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/javascript/src/javascripts/notes.js b/app/javascript/src/javascripts/notes.js index 45d08c3be..3a937b093 100644 --- a/app/javascript/src/javascripts/notes.js +++ b/app/javascript/src/javascripts/notes.js @@ -680,10 +680,13 @@ let Note = { $note_body.data("id", String(data.id)).attr("data-id", data.id); $note_box.data("id", String(data.id)).attr("data-id", data.id); $note_box.removeClass("unsaved"); + $note_box.removeClass("movable"); } else { $note_box = Note.Box.find(data.id); $note_box.removeClass("unsaved"); + $note_box.removeClass("movable"); } + Note.move_id = null; }, save: function() {