slate-angular 20.2.0-next.33 → 20.2.0-next.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2941,9 +2941,20 @@ class ListRender {
2941
2941
  if (this.preRenderingHTMLElement.length > 0) {
2942
2942
  const preRenderingElement = [...this.preRenderingHTMLElement];
2943
2943
  preRenderingElement.forEach((rootNodes, index) => {
2944
- rootNodes.forEach(rootNode => {
2945
- setPreRenderingElementStyle(this.viewContext.editor, rootNode, true);
2946
- });
2944
+ const slateElement = this.children[index];
2945
+ if (slateElement && children.indexOf(slateElement) >= 0) {
2946
+ rootNodes.forEach(rootNode => {
2947
+ setPreRenderingElementStyle(this.viewContext.editor, rootNode, true);
2948
+ });
2949
+ if (isDebug) {
2950
+ debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(this.children[index]), 'is clear true');
2951
+ }
2952
+ }
2953
+ else {
2954
+ if (isDebug) {
2955
+ debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(this.children[index]), 'do not clear since it would be removed soon');
2956
+ }
2957
+ }
2947
2958
  });
2948
2959
  this.preRenderingHTMLElement = [];
2949
2960
  }
@@ -3051,6 +3062,9 @@ class ListRender {
3051
3062
  setPreRenderingElementStyle(this.viewContext.editor, rootNode);
3052
3063
  });
3053
3064
  this.preRenderingHTMLElement.push(rootNodes);
3065
+ if (isDebug) {
3066
+ debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(children[i]));
3067
+ }
3054
3068
  }
3055
3069
  }
3056
3070
  }