From 81187ebb0ec797d147f20a8091adb4853d3a9532 Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 15 Oct 2017 20:22:18 -0400 Subject: [PATCH] use visibility instead of display for alt+m so design doesn't break when pressing alt+m again --- public/javascripts/init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/init.js b/public/javascripts/init.js index 03ff96976..756e34085 100644 --- a/public/javascripts/init.js +++ b/public/javascripts/init.js @@ -4,9 +4,9 @@ jQuery.hotkeys.options.filterContentEditable = true; $(document).bind('keydown', 'alt+m', () => { const toggle = $(".hide-toggle"); - const hidden = toggle.css('display') === 'none'; + const hidden = toggle.css('visibility') === 'hidden'; - toggle.css('display', hidden ? 'block' : 'none'); + toggle.css('visibility', hidden ? 'visible' : 'hidden'); }); // hide (toggle) everything except for the note content for distraction free writing