From fd8a62ba5e8a6ac16e5eda24c7df4b78f8ac0c9e Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 29 Jul 2020 10:03:53 -0500 Subject: [PATCH] notes: hide note bodies when resizing image. Bug: if you're editing a note and click preview, then you resize the image or press V to toggle the image size, then the note body will stay on the screen in the wrong position. --- app/javascript/src/javascripts/notes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/javascript/src/javascripts/notes.js b/app/javascript/src/javascripts/notes.js index b03acfed2..7aa42e9c9 100644 --- a/app/javascript/src/javascripts/notes.js +++ b/app/javascript/src/javascripts/notes.js @@ -362,6 +362,8 @@ class Note { return; } + Note.Body.hide_all(); + let large_width = parseFloat($image.data('large-width')); let ratio = $image.width() / large_width; let font_percentage = ratio * 100;