From 84cca4f472ffafe5df2311f1369092643bcbdbee Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Thu, 29 Aug 2013 17:42:18 -0400 Subject: [PATCH] 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 --- modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js index 1afb2b92c9..3d2de428ce 100644 --- a/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js +++ b/modules/ve/ui/inspectors/ve.ui.AnnotationInspector.js @@ -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; }