Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure that inline widgets are notified of resizings of outer editor

  • Loading branch information...
commit 62a4da0a625bbf5e5bb759b70ec85b947f5704e1 1 parent 523e35f
@njx njx authored
Showing with 7 additions and 2 deletions.
  1. +6 −1 src/editor/Editor.js
  2. +1 −1  src/editor/EditorManager.js
View
7 src/editor/Editor.js
@@ -992,8 +992,13 @@ define(function (require, exports, module) {
/**
* Re-renders the editor UI
*/
- Editor.prototype.refresh = function () {
+ Editor.prototype.refresh = function (handleResize) {
this._codeMirror.refresh();
+ if (handleResize) {
+ // If the editor has been resized, the position of inline widgets relative to the
+ // browser window might have changed.
+ this._fireWidgetOffsetTopChanged(0);
+ }
};
/**
View
2  src/editor/EditorManager.js
@@ -370,7 +370,7 @@ define(function (require, exports, module) {
if (_currentEditor) {
$(_currentEditor.getScrollerElement()).height(editorAreaHt);
if (!skipRefresh) {
- _currentEditor.refresh();
+ _currentEditor.refresh(true);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.