Skip to content

Commit

Permalink
Fix for #4372, resize with proper width
Browse files Browse the repository at this point in the history
  • Loading branch information
sculpt0r authored and jacekbogdanski committed Nov 23, 2020
1 parent 8bfcbae commit f915c4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/autogrow/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@
// to the one set by previous resizeEditor() call.
if ( newHeight != currentHeight && lastHeight != newHeight ) {
newHeight = editor.fire( 'autoGrow', { currentHeight: currentHeight, newHeight: newHeight } ).newHeight;
editor.resize( editor.container.getStyle( 'width' ), newHeight, true );

var boxSizing = editor.container.getComputedStyle( 'box-sizing' );
var isBorderBox = boxSizing === 'border-box';

var width = editor.container.getSize( 'width', isBorderBox );

editor.resize( width, newHeight, true );
lastHeight = newHeight;
}

Expand Down

0 comments on commit f915c4b

Please sign in to comment.