Merge "Focus the surface in the reference dialog after it opens"

This commit is contained in:
jenkins-bot 2014-04-16 19:00:51 +00:00 committed by Gerrit Code Review
commit 4d6a59b16b

View file

@ -23,6 +23,9 @@ ve.ui.MWReferenceDialog = function VeUiMWReferenceDialog( config ) {
// Properties
this.referenceModel = null;
// Events
this.connect( this, { 'open': 'onOpen' } );
};
/* Inheritance */
@ -319,6 +322,14 @@ ve.ui.MWReferenceDialog.prototype.setup = function ( data ) {
this.selectButton.setDisabled( this.search.isIndexEmpty() );
};
/**
* Respond to 'open' event. Fires once the dialog has finished opening.
*/
ve.ui.MWReferenceDialog.prototype.onOpen = function () {
// Focus the reference surface
this.referenceSurface.focus();
};
/**
* @inheritdoc
*/