mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Fix cursor location after Range::_deleteContents
Should always collapse to start.
This commit is contained in:
parent
5c9420c7fa
commit
c595fb0bb8
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue