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:
parent
cbd8881e78
commit
0388bcb640
1 changed files with 5 additions and 0 deletions
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue