| Index: third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| index 7a21d2074e4aa56afc68dd414cb906d862de6d29..8e3f3f7151e2dd4a8670b047a0bca1767650f690 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/text_editor/CodeMirrorTextEditor.js
|
| @@ -863,17 +863,19 @@ WebInspector.CodeMirrorTextEditor = class extends WebInspector.VBox {
|
| var parentElement = this.element.parentElement;
|
| if (!parentElement || !this.isShowing())
|
| return;
|
| - var scrollLeft = this._codeMirror.doc.scrollLeft;
|
| - var scrollTop = this._codeMirror.doc.scrollTop;
|
| - var width = parentElement.offsetWidth;
|
| - var height = parentElement.offsetHeight - this.element.offsetTop;
|
| - if (this._options.autoHeight) {
|
| - this._codeMirror.setSize(width, 'auto');
|
| - } else {
|
| - this._codeMirror.setSize(width, height);
|
| - this._updatePaddingBottom(width, height);
|
| - }
|
| - this._codeMirror.scrollTo(scrollLeft, scrollTop);
|
| + this._codeMirror.operation(() => {
|
| + var scrollLeft = this._codeMirror.doc.scrollLeft;
|
| + var scrollTop = this._codeMirror.doc.scrollTop;
|
| + var width = parentElement.offsetWidth;
|
| + var height = parentElement.offsetHeight - this.element.offsetTop;
|
| + if (this._options.autoHeight) {
|
| + this._codeMirror.setSize(width, 'auto');
|
| + } else {
|
| + this._codeMirror.setSize(width, height);
|
| + this._updatePaddingBottom(width, height);
|
| + }
|
| + this._codeMirror.scrollTo(scrollLeft, scrollTop);
|
| + });
|
| }
|
|
|
| /**
|
|
|