slate-angular 20.2.12 → 20.2.13
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.
|
@@ -3813,9 +3813,12 @@ class SlateEditable {
|
|
|
3813
3813
|
if (entries.length > 0 && entries[0].contentRect.width !== editorResizeObserverRectWidth) {
|
|
3814
3814
|
editorResizeObserverRectWidth = entries[0].contentRect.width;
|
|
3815
3815
|
this.keyHeightMap.clear();
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3816
|
+
let target = this.virtualTopHeightElement;
|
|
3817
|
+
if (this.inViewportChildren[0]) {
|
|
3818
|
+
const firstElement = this.inViewportChildren[0];
|
|
3819
|
+
const firstDomElement = AngularEditor.toDOMNode(this.editor, firstElement);
|
|
3820
|
+
target = firstDomElement;
|
|
3821
|
+
}
|
|
3819
3822
|
EDITOR_TO_ROOT_NODE_WIDTH.set(this.editor, target.offsetWidth);
|
|
3820
3823
|
updatePreRenderingElementWidth(this.editor);
|
|
3821
3824
|
if (isDebug) {
|
|
@@ -3948,7 +3951,7 @@ class SlateEditable {
|
|
|
3948
3951
|
}
|
|
3949
3952
|
}
|
|
3950
3953
|
}
|
|
3951
|
-
if (
|
|
3954
|
+
if (this.editor.selection) {
|
|
3952
3955
|
this.toNativeSelection(false);
|
|
3953
3956
|
}
|
|
3954
3957
|
}
|