Skip to content

Commit

Permalink
🎨 fix siyuan-note#5882
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 authored and leolee9086 committed Oct 4, 2022
1 parent c5bdc6f commit d0b2bdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/protyle/wysiwyg/getBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d0b2bdd

Please sign in to comment.