@hailin-zheng/editor-core 2.0.13 → 2.0.14

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.
package/index-cjs.js CHANGED
@@ -27003,7 +27003,7 @@ class DocEditor {
27003
27003
  return null;
27004
27004
  }
27005
27005
  const dataEle = ElementUtil.getParent(startControl, validateDataEle);
27006
- if (IsInSideDataElement(startControl, startOffset)) {
27006
+ if (dataEle instanceof DataElementLeaf || IsInSideDataElement(startControl, startOffset)) {
27007
27007
  return dataEle;
27008
27008
  }
27009
27009
  else {
@@ -27011,8 +27011,7 @@ class DocEditor {
27011
27011
  }
27012
27012
  }
27013
27013
  else if (!collapsed && ancestorCommonControl) {
27014
- const dataEle = ElementUtil.getParent(startControl, validateDataEle);
27015
- return dataEle;
27014
+ return ElementUtil.getParent(startControl, validateDataEle);
27016
27015
  }
27017
27016
  return null;
27018
27017
  }