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

Fix cursor location after Range::_deleteContents

Should always collapse to start.
This commit is contained in:
Neil Jenkins 2012-04-04 15:11:27 +10:00
parent 5c9420c7fa
commit c595fb0bb8

View file

@ -209,9 +209,8 @@ implement( Range.prototype, {
var isCollapsed = this.collapsed;
this.moveBoundariesDownTree();
if ( isCollapsed ) {
// Hopefully at least start or end is now a text node.
// Make that the focus point.
this.collapse( this.startContainer.nodeType === TEXT_NODE );
// Collapse
this.collapse( true );
}
return this;