Merge "Move the cursor to the end of newly inserted links"

This commit is contained in:
jenkins-bot 2012-12-11 19:34:02 +00:00 committed by Gerrit Code Review
commit 49bd56ffe9

View file

@ -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