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

Fix cursor when deleting range contents

This commit is contained in:
Neil Jenkins 2011-11-15 21:46:11 +11:00
parent feca3e4d8f
commit 143eea15cb

View file

@ -184,6 +184,11 @@ implement( Range, {
startBlock.mergeWithBlock( endBlock, this ); startBlock.mergeWithBlock( endBlock, this );
} }
// Ensure block has necessary children
if ( startBlock ) {
startBlock.fixCursor();
}
// Ensure body has a block-level element in it. // Ensure body has a block-level element in it.
var body = this.endContainer.ownerDocument.body, var body = this.endContainer.ownerDocument.body,
child = body.firstChild; child = body.firstChild;