浏览代码

Intenral: Covered another case with the same fix.

Marek Lewandowski 6 年之前
父节点
当前提交
61ea366dc0
共有 1 个文件被更改,包括 2 次插入7 次删除
  1. 2 7
      packages/ckeditor5-widget/src/widgetresize/resizerstate.js

+ 2 - 7
packages/ckeditor5-widget/src/widgetresize/resizerstate.js

@@ -126,13 +126,8 @@ export default class ResizeState {
 
 		const widthStyle = domResizeHost.style.width;
 
-		if ( widthStyle ) {
-			if ( widthStyle.match( /^\d+\.?\d*%$/ ) ) {
-				this.originalWidthPercents = parseFloat( widthStyle );
-			} else {
-				// TODO we need to check it via comparing to the parent's width.
-				this.originalWidthPercents = 50;
-			}
+		if ( widthStyle && widthStyle.match( /^\d+\.?\d*%$/ ) ) {
+			this.originalWidthPercents = parseFloat( widthStyle );
 		} else {
 			this.originalWidthPercents = this._getParentPercentage( domResizeHost );
 		}