Skip to content

Commit

Permalink
поправил стили
Browse files Browse the repository at this point in the history
  • Loading branch information
veglem committed May 8, 2024
1 parent 9e59446 commit 20a2a2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public/src/components/Editor/Editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ export class Editor {
if (!node || !node.parentElement) {
return null;
}
if (node.parentElement.contentEditable === 'true' && node.parentElement.parentElement.classList.contains('note-body')) {
if (node.parentElement.contentEditable === 'true' &&
node.parentElement.parentElement.classList.contains('note-body') &&
node.nodeType === Node.ELEMENT_NODE &&
(node as HTMLElement).tagName === "div") {
return node as HTMLElement;
} else {
return findBlock(node.parentElement);
Expand Down

0 comments on commit 20a2a2e

Please sign in to comment.