浏览代码

Do not rerender selection if it is consider similar to the previous one.

Krzysztof Krztoń 8 年之前
父节点
当前提交
2eb598f224
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      packages/ckeditor5-engine/src/view/renderer.js

+ 2 - 1
packages/ckeditor5-engine/src/view/renderer.js

@@ -576,7 +576,8 @@ export default class Renderer {
 		const domSelection = domRoot.ownerDocument.defaultView.getSelection();
 		const oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );
 
-		if ( oldViewSelection && this.selection.isEqual( oldViewSelection ) ) {
+		if ( oldViewSelection && ( this.selection.isEqual( oldViewSelection ) ||
+			!this.selection.isCollapsed && this.selection.isSimilar( oldViewSelection ) ) ) {
 			return;
 		}