Explorar o código

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

Krzysztof Krztoń %!s(int64=8) %!d(string=hai) anos
pai
achega
2eb598f224
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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;
 		}