diff --git a/modules/ui/modes.js b/modules/ui/modes.js index 7c70b09cc..fca3e07e9 100644 --- a/modules/ui/modes.js +++ b/modules/ui/modes.js @@ -82,9 +82,15 @@ export function uiModes(context) { var keybinding = d3keybinding('mode-buttons'); - modes.forEach(function(m) { - keybinding.on(m.key, function() { - if (editable()) context.enter(m); + modes.forEach(function(mode) { + keybinding.on(mode.key, function() { + if (editable()) { + if (mode.id === context.mode().id) { + context.enter(modeBrowse(context)); + } else { + context.enter(mode); + } + } }); });