Browse Source

Prevent from splitting context tree in view->model conversion.

Oskar Wróbel 8 năm trước cách đây
mục cha
commit
13ca5394d3

+ 5 - 0
packages/ckeditor5-engine/src/conversion/viewconversiondispatcher.js

@@ -280,6 +280,11 @@ export default class ViewConversionDispatcher {
 			return null;
 		}
 
+		// When allowed parent is in context tree.
+		if ( this._modelCursor.parent.getAncestors().includes( allowedParent ) ) {
+			return null;
+		}
+
 		// When current position parent allows to insert element then return this position.
 		if ( allowedParent === cursorPosition.parent ) {
 			return { position: cursorPosition };