0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

If deleting range to start/end of doc, collapse into a block

This commit is contained in:
Neil Jenkins 2016-12-09 10:41:52 +11:00
parent 8850c76234
commit 30dc11fd3c

View file

@ -172,7 +172,7 @@ var deleteContentsOfRange = function ( range, root ) {
fixCursor( root, root );
range.selectNodeContents( root.firstChild );
} else {
range.collapse( false );
range.collapse( range.endContainer === root ? true : false );
}
return frag;
};