@linker-design-plus/tiny-peony 1.3.11 → 1.3.12

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/dist/index.mjs CHANGED
@@ -347,7 +347,7 @@ const yI = (C, e) => {
347
347
  const P = window.getSelection(), BA = document.createRange();
348
348
  BA.setStart(h, w), BA.setEnd(h, w), P == null || P.removeAllRanges(), P == null || P.addRange(BA);
349
349
  }
350
- i = window.getSelection().getRangeAt(0), i = DA(i.commonAncestorContainer) && i.commonAncestorContainer.textContent === "粘贴文本" ? t : i;
350
+ i = C.cursor.isRangeInEditor() ? window.getSelection().getRangeAt(0) : t, i = DA(i.commonAncestorContainer) && i.commonAncestorContainer.textContent === "粘贴文本" ? t : i;
351
351
  const [f] = JA(
352
352
  i.commonAncestorContainer,
353
353
  (q) => q.tagName === "P" && q.classList.contains(pA)