From a1384c9abf6a2ac35de71c1a598b234bf2de9c65 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 5 Sep 2017 13:08:15 +0200 Subject: [PATCH] Fixed pre-selection of message tabs Fixes #2401 --- wcfsetup/install/files/js/WCF.Message.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 4bd9a47143..89f6bc988d 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2076,6 +2076,7 @@ $.widget('wcf.messageTabMenu', { return false; } }); + if ($preselect === 'true') $preselect = true; this._tabs = [ ]; this._tabsByName = { }; @@ -2106,7 +2107,7 @@ $.widget('wcf.messageTabMenu', { this._tabsByName[$name] = $i; var $anchor = $tab.children('a').data('index', $i).on('mousedown', this._showTab.bind(this)); - if ($preselect == $name) { + if ($preselect === $name || ($preselect === true && $i === 0)) { $anchor.trigger('mousedown'); } } -- 2.20.1