Переглянути джерело

View element clone should use normalized object.

Maciej Gołaszewski 6 роки тому
батько
коміт
87ed49cde1

+ 1 - 1
packages/ckeditor5-engine/src/view/element.js

@@ -516,7 +516,7 @@ export default class Element extends Node {
 		// Classes and styles are cloned separately - this solution is faster than adding them back to attributes and
 		// parse once again in constructor.
 		cloned._classes = new Set( this._classes );
-		cloned._styles.setStyle( this._styles.getInlineStyle() );
+		cloned._styles.insertProperty( this._styles.getNormalized() );
 
 		// Clone custom properties.
 		cloned._customProperties = new Map( this._customProperties );

+ 1 - 1
packages/ckeditor5-engine/src/view/styles.js

@@ -191,7 +191,7 @@ export default class Styles {
 	 *			'margin-right': '1em'
 	 *		} );
 	 *
-	 * Supports shorthands.y
+	 * Supports shorthands.
 	 *
 	 * @param {String|Object} nameOrObject
 	 * @param {String|Object} value