From 5b0e1a644d646bb87ea3a8ef8a6b5db07352fce3 Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 8 Apr 2018 12:17:42 -0400 Subject: [PATCH] codemirror now doesn't hijack alt-left/right, fixes #86 --- src/public/javascripts/services/note_detail_code.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/public/javascripts/services/note_detail_code.js b/src/public/javascripts/services/note_detail_code.js index 00b52194d..5a9baf2b3 100644 --- a/src/public/javascripts/services/note_detail_code.js +++ b/src/public/javascripts/services/note_detail_code.js @@ -16,6 +16,10 @@ async function show() { CodeMirror.keyMap.default["Shift-Tab"] = "indentLess"; CodeMirror.keyMap.default["Tab"] = "indentMore"; + // these conflict with backward/forward navigation shortcuts + delete CodeMirror.keyMap.default["Alt-Left"]; + delete CodeMirror.keyMap.default["Alt-Right"]; + CodeMirror.modeURL = 'libraries/codemirror/mode/%N/%N.js'; codeEditor = CodeMirror($noteDetailCode[0], {