mirror of
https://github.com/fastmail/Squire.git
synced 2025-02-03 12:48:43 -05:00
#472 fixed contenteditable=false elements being merged when they shouldn't, fixed compilation error caused by missing nullcheck
This commit is contained in:
parent
bb795b04bb
commit
2293b4a12b
2 changed files with 3 additions and 2 deletions
|
@ -2122,7 +2122,7 @@ class Squire {
|
|||
break;
|
||||
}
|
||||
|
||||
if (!(child as HTMLElement).isContentEditable) {
|
||||
if (child && !(child as HTMLElement).isContentEditable) {
|
||||
replaceWith(child, document.createTextNode('') as Text);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,8 @@ const areAlike = (
|
|||
return (
|
||||
node.nodeName !== 'A' &&
|
||||
node.className === node2.className &&
|
||||
node.style.cssText === node2.style.cssText
|
||||
node.style.cssText === node2.style.cssText &&
|
||||
(node as HTMLElement).isContentEditable && (node2 as HTMLElement).isContentEditable
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue