This commit is contained in:
parent
655bc40142
commit
d4d45d0db3
1 changed files with 2 additions and 1 deletions
|
@ -94,7 +94,8 @@ export const getTopEmptyElement = (element: Element) => {
|
|||
while (topElement.parentElement && !topElement.parentElement.classList.contains("protyle-wysiwyg")) {
|
||||
if (!topElement.parentElement.getAttribute("data-node-id")) {
|
||||
topElement = topElement.parentElement;
|
||||
} else if (topElement.parentElement.textContent !== "" || topElement.previousElementSibling?.getAttribute("data-node-id")) {
|
||||
} else if (getContenteditableElement(topElement.parentElement).textContent !== "" ||
|
||||
topElement.previousElementSibling?.getAttribute("data-node-id")) {
|
||||
break;
|
||||
} else {
|
||||
topElement = topElement.parentElement;
|
||||
|
|
Loading…
Add table
Reference in a new issue