From ea2fffbd49274574ef5726015585b19e6382021b Mon Sep 17 00:00:00 2001 From: Thomas Hervey Date: Tue, 17 Jul 2018 14:25:06 -0400 Subject: [PATCH] fix toggling new note button --- modules/ui/modes.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ui/modes.js b/modules/ui/modes.js index 8b434f8c4..f024dfa96 100644 --- a/modules/ui/modes.js +++ b/modules/ui/modes.js @@ -99,7 +99,11 @@ export function uiModes(context) { modes.forEach(function(mode) { keybinding.on(mode.key, function() { - if (editable()) { + // TODO: allow zooming out beyond minZoom when adding new note. Currently prevented + if ( + (editable() && mode.id !== 'add-note') + || (toggleNewNote() && mode.id === 'add-note') + ) { if (mode.id === context.mode().id) { context.enter(modeBrowse(context)); } else {