Cursor fix after link insertion

When a link was inserted, the cursor position was backwards (at the
beginning of the word rather than its end) - this commit fixes that
problem.

Also, thanks for the help Ed!

Bug: 53560
Change-Id: I04fe1ca4c9126898e7bf85cdf519794d66b4f38b
This commit is contained in:
Moriel Schottlender 2013-08-29 17:42:18 -04:00 committed by Jforrester
parent 4291b2a308
commit 84cca4f472

View file

@ -166,7 +166,7 @@ ve.ui.AnnotationInspector.prototype.onClose = function ( action ) {
// Apply new annotation
fragment.annotateContent( 'set', annotation );
}
if ( action === 'back' ) {
if ( action === 'back' || insert ) {
// Restore selection to what it was before we expanded it
selection = this.previousSelection;
}