use visibility instead of display for alt+m so design doesn't break when pressing alt+m again

This commit is contained in:
azivner 2017-10-15 20:22:18 -04:00
parent ae5bba83b1
commit 81187ebb0e

View file

@ -4,9 +4,9 @@ jQuery.hotkeys.options.filterContentEditable = true;
$(document).bind('keydown', 'alt+m', () => { $(document).bind('keydown', 'alt+m', () => {
const toggle = $(".hide-toggle"); 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 // hide (toggle) everything except for the note content for distraction free writing