0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 23:40:35 -05:00

#472 fixed contenteditable inline element being split when pressing enter

This commit is contained in:
Alexander Gratzl 2024-11-29 12:13:34 +01:00
parent cbd8881e78
commit 0388bcb640

View file

@ -2122,6 +2122,11 @@ class Squire {
break;
}
if (!(child as HTMLElement).isContentEditable) {
replaceWith(child, document.createTextNode('') as Text);
break;
}
while (child && child instanceof Text && !child.data) {
next = child.nextSibling;
if (!next || next.nodeName === 'BR') {