mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Fixing backspace when at the beginning of the document.
Change-Id: Ib4c463c6a1eb27897a39c96c46617047d8ee4325
This commit is contained in:
parent
48bba8fcb8
commit
4df69b01de
|
@ -603,7 +603,7 @@ ve.ce.Surface.prototype.handleDelete = function( backspace ) {
|
|||
if ( selection.from === selection.to ) {
|
||||
if ( backspace ) {
|
||||
sourceOffset = selection.to;
|
||||
targetOffset = this.model.getDocument().getRelativeContentOffset( sourceOffset, -1 );
|
||||
targetOffset = this.getNearestCorrectOffset( sourceOffset - 1, -1 );
|
||||
//this.model.setSelection( new ve.Range( targetOffset, targetOffset ) );
|
||||
} else {
|
||||
sourceOffset = this.model.getDocument().getRelativeContentOffset( selection.to, 1 );
|
||||
|
|
Loading…
Reference in a new issue