瀏覽代碼

Make resizeObserver protected value

panr 5 年之前
父節點
當前提交
8a4315a2d9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/ckeditor5-ui/src/toolbar/balloon/balloontoolbar.js

+ 2 - 2
packages/ckeditor5-ui/src/toolbar/balloon/balloontoolbar.js

@@ -78,7 +78,7 @@ export default class BalloonToolbar extends Plugin {
 		 *
 		 * **Note:** Created in {@link #init}.
 		 *
-		 * @readonly
+		 * @protected
 		 * @member {module:utils/dom/getresizeobserver~ResizeObserver}
 		 */
 		this.resizeObserver = null;
@@ -154,7 +154,7 @@ export default class BalloonToolbar extends Plugin {
 				const editableElement = editor.ui.view.editable.element;
 
 				// Set toolbar's max-width on the initialization and update it on the editable resize.
-				this.widthObserver = new ResizeObserver( editableElement, () => {
+				this.resizeObserver = new ResizeObserver( editableElement, () => {
 					// We need to check if there's already the editable element in the DOM.
 					// Otherwise the `Rect` instance will complain that source (editableElement) is not available
 					// to obtain the element's geometry.