Permalink
Browse files

Fix cursor location after Range::_deleteContents

Should always collapse to start.
  • Loading branch information...
1 parent 5c9420c commit c595fb0bb8049d93d1685724969d2b0debce9c16 @neilj committed Apr 4, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 source/Range.js
View
@@ -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;

0 comments on commit c595fb0

Please sign in to comment.