mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Don't try to focus a removed template parameter
The event "focusTemplateParameterById" targets the right side of the dialog. The input field for the parameter should be focussed. This doesn't make any sense when the parameter was just removed (i.e. unselected). Change-Id: Ie75b1edaebe9d0444b98e66cb56a5c7774393bea
This commit is contained in:
parent
0a8b462b0f
commit
937352a138
|
@ -188,7 +188,7 @@ ve.ui.MWTransclusionOutlineTemplateWidget.prototype.onTemplateParameterChoose =
|
|||
this.onTemplateParameterSelectionChanged( item, selected );
|
||||
|
||||
var param = this.templateModel.getParameter( item.getData() );
|
||||
if ( param ) {
|
||||
if ( param && selected ) {
|
||||
this.emit( 'focusTemplateParameterById', param.getId() );
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue