Robmoen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/72985


Change subject: Focus link inspector input prior to lookup.
......................................................................

Focus link inspector input prior to lookup.

Since the menu only shows while it's input is focused, input must be focused
prior to suggestions being popuplated.  Fixes race condition where
look up request is near instantaneous.

Change-Id: Icf645d051415ac3ee9e15bc85f22f29dc9b64666
---
M modules/ve/ui/inspectors/ve.ui.LinkInspector.js
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/85/72985/1

diff --git a/modules/ve/ui/inspectors/ve.ui.LinkInspector.js 
b/modules/ve/ui/inspectors/ve.ui.LinkInspector.js
index 298ce70..ef28386 100644
--- a/modules/ve/ui/inspectors/ve.ui.LinkInspector.js
+++ b/modules/ve/ui/inspectors/ve.ui.LinkInspector.js
@@ -129,10 +129,12 @@
        // Wait for animation to complete
        this.surface.disable();
        setTimeout( ve.bind( function () {
+               // Note: Focus input prior to setting target annotation
+               this.targetInput.$input.focus();
                // Setup annotation
                this.initialAnnotationHash = initialAnnotation && ve.getHash( 
initialAnnotation );
                this.targetInput.setAnnotation( annotation );
-               this.targetInput.$input.focus().select();
+               this.targetInput.$input.select();
                this.surface.enable();
        }, this ), 200 );
 };

-- 
To view, visit https://gerrit.wikimedia.org/r/72985
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf645d051415ac3ee9e15bc85f22f29dc9b64666
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Robmoen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to