From e727726d2a86e46e02c109bc05fa8e09d9a96d65 Mon Sep 17 00:00:00 2001 From: Pavel Astakhov Date: Mon, 11 Sep 2017 22:37:38 +0600 Subject: [PATCH] Fix word jumping (option+arrow key) for Mac Bug: T175378 Bug: T174055 Change-Id: I7f648691ec3b36f9abe1c5c7fbe5c97e142f500e --- resources/ext.CodeMirror.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index 7a253e74..1ebd32ce 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -17,6 +17,10 @@ // This can be the string "0" if the user disabled the preference - Bug T54542#555387 mw.user.options.get( 'usebetatoolbar' ) > 0; + // T174055: Do not redefine the browser history navigation keys (T175378: for PC only) + CodeMirror.keyMap.pcDefault[ 'Alt-Left' ] = false; + CodeMirror.keyMap.pcDefault[ 'Alt-Right' ] = false; + // function for a textselection function for CodeMirror function cmTextSelection( command, options ) { var fn, retval; @@ -370,10 +374,7 @@ Tab: false, // T174514: Move the cursor at the beginning/end of the current wrapped line Home: 'goLineLeft', - End: 'goLineRight', - // T174055: Do not redefine the browser history navigation keys - 'Alt-Left': false, - 'Alt-Right': false + End: 'goLineRight' }, viewportMargin: Infinity } );