From a19e874b7b35aea8cdb022e960969a075a474548 Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Sun, 21 Feb 2021 20:39:07 +0100 Subject: [PATCH] Fix back keyboard shortcut --- extension/src/json-viewer/highlighter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extension/src/json-viewer/highlighter.js b/extension/src/json-viewer/highlighter.js index 5df1c248..c3a1cb5c 100644 --- a/extension/src/json-viewer/highlighter.js +++ b/extension/src/json-viewer/highlighter.js @@ -191,6 +191,11 @@ Highlighter.prototype = { var nativeSearch = this.alwaysRenderAllContent(); extraKeyMap["Ctrl-F"] = nativeSearch ? false : this.openSearchDialog; extraKeyMap["Cmd-F"] = nativeSearch ? false : this.openSearchDialog; + + delete CodeMirror.keyMap.macDefault["Cmd-["]; + delete CodeMirror.keyMap.pcDefault["Alt-Left"]; + extraKeyMap["Cmd-Left"] = function() { window.history.back(); }; + return extraKeyMap; },