Settings dialog: Focus redirect target input when redirect is enabled

Bug: T106616
Change-Id: Ia635552825194908503b8e8eef61f5fa2733a9da
This commit is contained in:
Alex Monk 2015-07-29 23:58:43 +01:00
parent f616edd310
commit 45325e0db7

View file

@ -196,7 +196,9 @@ ve.ui.MWSettingsPage.prototype.onTableOfContentsFieldChange = function () {
ve.ui.MWSettingsPage.prototype.onEnableRedirectChange = function ( value ) {
this.redirectTargetInput.setDisabled( !value );
this.enableStaticRedirectInput.setDisabled( !value );
if ( !value ) {
if ( value ) {
this.redirectTargetInput.focus();
} else {
this.redirectTargetInput.setValue( '' );
this.enableStaticRedirectInput.setSelected( false );
}