Skip to content

Commit 428d6e1

Browse files
committedApr 21, 2024
1 parent 943d8da commit 428d6e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎app/src/protyle/util/insertHTML.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
168168
updateCellsValue(protyle, blockElement as HTMLElement, text);
169169
} else if (cellsElement.length > 0) {
170170
updateCellsValue(protyle, blockElement as HTMLElement, text, cellsElement);
171-
} else {
171+
} else if (hasClosestByClassName(range.startContainer, "av__title")) {
172172
range.insertNode(document.createTextNode(text));
173173
range.collapse(false);
174174
updateAVName(protyle, blockElement);

‎app/src/protyle/wysiwyg/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,7 @@ export class WYSIWYG {
17631763
return;
17641764
}
17651765
const blockElement = hasClosestBlock(event.target);
1766-
if (blockElement && (!getContenteditableElement(blockElement) || hasClosestByClassName(event.target, "av__cursor"))) {
1766+
if (blockElement && !getContenteditableElement(blockElement)) {
17671767
event.stopPropagation();
17681768
event.preventDefault();
17691769
return;

0 commit comments

Comments
 (0)
Please sign in to comment.