From 2d5af9608a3a926d9dcf97ef711cb6a6c918c37f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Tue, 29 Jun 2021 22:57:06 +0200 Subject: [PATCH] Fix saving edit mode on mobile in reply tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When this code was added in 5feb69612fc61794dc2fd62feb0451d15fa8a1c2, it was inside the `if ( this.modeTabSelect ) { … }`, because switching was an experimental option and could have been unavailable. Switching is always available now, but the `modeTabSelect` widget doesn't exist in the mobile version (because switching interface is a part of the toolbar there), so this line should be outside the `if`. Bug: T270536 Change-Id: I7c5959281e77558bfe82bd39d38ba4dda36d590c --- modules/dt.ui.ReplyWidget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dt.ui.ReplyWidget.js b/modules/dt.ui.ReplyWidget.js index 6d8f1c5a9..7463f70ac 100644 --- a/modules/dt.ui.ReplyWidget.js +++ b/modules/dt.ui.ReplyWidget.js @@ -478,8 +478,8 @@ ReplyWidget.prototype.setup = function ( data ) { // Make the option for the current mode disabled, to make it un-interactable // (we override the styles to make it look as if it was selected) this.modeTabSelect.findItemFromData( this.getMode() ).setDisabled( true ); - this.saveEditMode( this.getMode() ); } + this.saveEditMode( this.getMode() ); var summary = this.storage.get( this.storagePrefix + '/summary' ) || data.editSummary;