mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
Merge "Move the cursor to the end of newly inserted links"
This commit is contained in:
commit
49bd56ffe9
|
@ -154,7 +154,9 @@ ve.ui.LinkInspector.prototype.onClose = function ( remove ) {
|
|||
}
|
||||
if ( insert ) {
|
||||
// Insert default text and select it
|
||||
fragment = fragment.insertContent( target, false ).adjustRange( -target.length );
|
||||
fragment = fragment.insertContent( target, false );
|
||||
// Move cursor to the end of the inserted content
|
||||
selection = new ve.Range( this.initialSelection.start + target.length );
|
||||
}
|
||||
if ( undo ) {
|
||||
// Go back to before we added an annotation in an onInitialize handler
|
||||
|
|
Loading…
Reference in a new issue