Merge "Make textbox height flexible with CodeMirror"

This commit is contained in:
jenkins-bot 2017-11-07 01:26:17 +00:00 committed by Gerrit Code Review
commit d2855c76f4
2 changed files with 9 additions and 1 deletions

View file

@ -33,7 +33,8 @@
"mediawiki.user",
"user.options",
"oojs-ui-widgets",
"mediawiki.storage"
"mediawiki.storage",
"jquery.ui.resizable"
],
"scripts": [
"ext.CodeMirror.js"

View file

@ -326,6 +326,13 @@
$codeMirror = $( codeMirror.getWrapperElement() );
$codeMirror.resizable( {
handles: 'se',
resize: function ( event, ui ) {
ui.size.width = ui.originalSize.width;
}
} );
codeMirror.doc.setSelection( codeMirror.doc.posFromIndex( selectionEnd ), codeMirror.doc.posFromIndex( selectionStart ) );
codeMirror.scrollTo( null, scrollTop );