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:
parent
5c9420c7fa
commit
c595fb0bb8
1 changed files with 2 additions and 3 deletions
|
@ -209,9 +209,8 @@ implement( Range.prototype, {
|
||||||
var isCollapsed = this.collapsed;
|
var isCollapsed = this.collapsed;
|
||||||
this.moveBoundariesDownTree();
|
this.moveBoundariesDownTree();
|
||||||
if ( isCollapsed ) {
|
if ( isCollapsed ) {
|
||||||
// Hopefully at least start or end is now a text node.
|
// Collapse
|
||||||
// Make that the focus point.
|
this.collapse( true );
|
||||||
this.collapse( this.startContainer.nodeType === TEXT_NODE );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in a new issue