mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Don't try to merge <br>s or <img>s etc.
This commit is contained in:
parent
9dcbf45f4a
commit
ae09554883
2 changed files with 3 additions and 2 deletions
|
@ -1002,7 +1002,7 @@ document.addEventListener( 'DOMContentLoaded', function () {
|
|||
splitTag = nextTag[ tag ],
|
||||
nodeAfterSplit;
|
||||
|
||||
if ( !block || event.shift ) {
|
||||
if ( !block ) {
|
||||
range._insertNode( createElement( 'BR' ) );
|
||||
range.collapse( false );
|
||||
setSelection( range );
|
||||
|
|
|
@ -206,7 +206,8 @@ implement( Element, {
|
|||
while ( l-- ) {
|
||||
child = children[l];
|
||||
prev = l && children[ l - 1 ];
|
||||
if ( l && child.isInline() && child.isLike( prev ) ) {
|
||||
if ( l && child.isInline() && child.isLike( prev ) &&
|
||||
!leafNodeNames[ child.nodeName ] ) {
|
||||
if ( range.startContainer === child ) {
|
||||
range.startContainer = prev;
|
||||
range.startOffset += prev.getLength();
|
||||
|
|
Loading…
Reference in a new issue