Fix conflict with the CodeEditor extension (v 3.2.3)

CodeMirror will be not initialized if CodeEditor is used

Change-Id: I78ab2814beb0e40a878f6a02b7d3967c216afce6
This commit is contained in:
Pavel Astakhov 2015-11-18 11:34:36 +06:00
parent 0cc7a8d635
commit 82f8acd450
2 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "CodeMirror",
"version": "3.2.2",
"version": "3.2.3",
"author": [
"[https://www.mediawiki.org/wiki/User:Pastakhov Pavel Astakhov]",
"[https://www.mediawiki.org/wiki/User:Florianschmidtwelzow Florian Schmidt]"

View file

@ -1,5 +1,9 @@
/* global CodeMirror, mediaWiki */
( function ( mw, $ ) {
if ( mw.config.get( 'wgCodeEditorCurrentLanguage' ) ) { // If the CodeEditor is used then just exit;
return;
}
// codeMirror needs a special textselection jQuery function to work, save the current one to restore when
// CodeMirror get's disabled.
var origTextSelection = $.fn.textSelection,