Fix switching interface getting stuck after failing to switch

Follow-up to 58c078437d.

Bug: T274423
Change-Id: Ie410b61e2b64d9ef2bb20d5df9f95d2c90392323
This commit is contained in:
Bartosz Dziewoński 2021-03-29 21:19:52 +02:00
parent 4e956d11b9
commit 5dae22e93a

View file

@ -387,8 +387,8 @@ ReplyWidget.prototype.onModeTabSelectChoose = function ( option ) {
this.switch( mode ).then(
null,
function () {
// Switch failed, restore previous tab selection
widget.modeTabSelect.selectItemByData( mode === 'source' ? 'visual' : 'source' );
// Switch failed, clear the tab selection
widget.modeTabSelect.selectItem( null );
}
).always( function () {
widget.modeTabSelect.setDisabled( false );