mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-24 06:13:31 +00:00
Merge "Make textbox height flexible with CodeMirror"
This commit is contained in:
commit
d2855c76f4
|
@ -33,7 +33,8 @@
|
|||
"mediawiki.user",
|
||||
"user.options",
|
||||
"oojs-ui-widgets",
|
||||
"mediawiki.storage"
|
||||
"mediawiki.storage",
|
||||
"jquery.ui.resizable"
|
||||
],
|
||||
"scripts": [
|
||||
"ext.CodeMirror.js"
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in a new issue