Vanessa 2025-01-09 12:03:37 +08:00
parent ba2cd2828b
commit 0a53a78900
2 changed files with 2 additions and 2 deletions

View file

@ -163,7 +163,7 @@ export const countBlockWord = (ids: string[], rootID?: string, clearCache = fals
if (document.getElementById("status").classList.contains("fn__none")) {
return;
}
if (getSelection().rangeCount > 0 && getSelection().getRangeAt(0).toString()) {
if (getSelection().rangeCount > 0 && getSelection().getRangeAt(0).toString() && ids.length === 0) {
countSelectWord(getSelection().getRangeAt(0));
return;
}

View file

@ -2118,7 +2118,7 @@ export class WYSIWYG {
if (event.eventPhase !== 3 && !event.shiftKey && (event.key.indexOf("Arrow") > -1 || event.key === "Home" || event.key === "End" || event.key === "PageUp" || event.key === "PageDown") && !event.isComposing) {
if (nodeElement) {
this.setEmptyOutline(protyle, nodeElement);
if (range.toString() === "") {
if (range.toString() === "" && !nodeElement.classList.contains("protyle-wysiwyg--select")) {
countSelectWord(range, protyle.block.rootID);
}
if (protyle.breadcrumb) {