ext.CodeMirror.js: Keep at 100% parent width

Force the CodeMirror area to stay at 100% parent width during a
resize event.

Bug: T305939
Change-Id: I99f5d0b0955521f522a549b2cf1f2205cb0e48c0
This commit is contained in:
samtar 2022-08-04 12:54:40 +01:00
parent 7404a9f2a0
commit 5061cc1228
No known key found for this signature in database
GPG key ID: 2C15A644ABE9A27E

View file

@ -117,8 +117,9 @@
// RL module jquery.ui
$codeMirror.resizable( {
handles: 'se',
resize: function ( event, ui ) {
ui.size.width = ui.originalSize.width;
resize: function () {
// Keep at 100% parent width, don't modify height here
codeMirror.setSize( '100%', null );
}
} );
// Match the height of the textarea.