r89864 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89863‎ | r89864 | r89865 >
Date:00:08, 11 June 2011
Author:brion
Status:deferred
Tags:
Comment:
CodeEditor: attempt at disabling some annoying keyboard shortcuts in Ace, but it's not working.

Issue filed upstream at https://github.com/ajaxorg/ace/issues/294 & asked about on mailing list.
Modified paths:
  • /trunk/extensions/CodeEditor/modules/jquery.codeEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeEditor/modules/jquery.codeEditor.js
@@ -92,6 +92,15 @@
9393 var map = {js: 'javascript', css: 'css'};
9494 var lang = map[ext];
9595
 96+ // Disable some annoying commands
 97+ // This doesn't seem to work; filed as https://github.com/ajaxorg/ace/issues/294
 98+ var canon = require('pilot/canon');
 99+ //console.log(canon.getCommandNames());
 100+ canon.removeCommand('replace'); // ctrl+R
 101+ canon.removeCommand('transposeletters'); // ctrl+T
 102+ canon.removeCommand('gotoline'); // ctrl+L
 103+ //console.log(canon.getCommandNames());
 104+
96105 // Ace doesn't like replacing a textarea directly.
97106 // We'll stub this out to sit on top of it...
98107 // line-height is needed to compensate for oddity in WikiEditor extension, which zeroes the line-height on a parent container

Status & tagging log