Merge "Focus link inspector input prior to lookup."

This commit is contained in:
jenkins-bot 2013-07-10 19:03:38 +00:00 committed by Gerrit Code Review
commit c404079f61

View file

@ -129,10 +129,12 @@ ve.ui.LinkInspector.prototype.onOpen = function () {
// Wait for animation to complete // Wait for animation to complete
this.surface.disable(); this.surface.disable();
setTimeout( ve.bind( function () { setTimeout( ve.bind( function () {
// Note: Focus input prior to setting target annotation
this.targetInput.$input.focus();
// Setup annotation // Setup annotation
this.initialAnnotationHash = initialAnnotation && ve.getHash( initialAnnotation ); this.initialAnnotationHash = initialAnnotation && ve.getHash( initialAnnotation );
this.targetInput.setAnnotation( annotation ); this.targetInput.setAnnotation( annotation );
this.targetInput.$input.focus().select(); this.targetInput.$input.select();
this.surface.enable(); this.surface.enable();
}, this ), 200 ); }, this ), 200 );
}; };