mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-26 19:56:49 +00:00
Merge "Focus the surface in the reference dialog after it opens"
This commit is contained in:
commit
4d6a59b16b
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue