This commit is contained in:
Vanessa 2024-04-21 12:14:18 +08:00
parent 943d8dac43
commit 428d6e189d
2 changed files with 2 additions and 2 deletions

View file

@ -168,7 +168,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
updateCellsValue(protyle, blockElement as HTMLElement, text);
} else if (cellsElement.length > 0) {
updateCellsValue(protyle, blockElement as HTMLElement, text, cellsElement);
} else {
} else if (hasClosestByClassName(range.startContainer, "av__title")) {
range.insertNode(document.createTextNode(text));
range.collapse(false);
updateAVName(protyle, blockElement);

View file

@ -1763,7 +1763,7 @@ export class WYSIWYG {
return;
}
const blockElement = hasClosestBlock(event.target);
if (blockElement && (!getContenteditableElement(blockElement) || hasClosestByClassName(event.target, "av__cursor"))) {
if (blockElement && !getContenteditableElement(blockElement)) {
event.stopPropagation();
event.preventDefault();
return;