mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
Merge "Fix target detection for jquery.textSelection overrides"
This commit is contained in:
commit
4df91bb67a
|
@ -1,6 +1,6 @@
|
|||
( function ( mw, $ ) {
|
||||
var origTextSelection, useCodeMirror, codeMirror, api, originHooksTextarea,
|
||||
wikiEditorToolbarEnabled, enableContentEditable = true;
|
||||
wikiEditorToolbarEnabled, enableContentEditable = true, textBox;
|
||||
|
||||
if ( mw.config.get( 'wgCodeEditorCurrentLanguage' ) ) { // If the CodeEditor is used then just exit;
|
||||
return;
|
||||
|
@ -54,7 +54,9 @@
|
|||
function cmTextSelection( command, options ) {
|
||||
var fn, retval;
|
||||
|
||||
if ( !codeMirror ) {
|
||||
if ( !codeMirror ||
|
||||
( this[ 0 ] !== textBox && this[ 0 ] !== codeMirror.getWrapperElement() )
|
||||
) {
|
||||
return origTextSelection.call( this, command, options );
|
||||
}
|
||||
|
||||
|
@ -325,6 +327,7 @@
|
|||
} );
|
||||
|
||||
$codeMirror = $( codeMirror.getWrapperElement() );
|
||||
textBox = $textbox1[ 0 ];
|
||||
|
||||
$codeMirror.resizable( {
|
||||
handles: 'se',
|
||||
|
|
Loading…
Reference in a new issue