From: Alexander Ebert Date: Wed, 14 Sep 2016 09:04:00 +0000 (+0200) Subject: Disable auto-open of message tabs for small devices X-Git-Tag: 3.0.0_Beta_1~175 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c1c642165840907c58734cd8d1c3e8af8bc2cbbe;p=GitHub%2FWoltLab%2FWCF.git Disable auto-open of message tabs for small devices --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 4a041c2cb7..1c3e1683e2 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -2230,7 +2230,7 @@ $.widget('wcf.messageTabMenu', { } } - if ($preselect === true && this._tabs.length) { + if ($preselect === true && this._tabs.length && !window.matchMedia('(max-width: 544px)').matches) { // pick the first available tab this._tabs[0].tab.children('a').trigger('click'); } @@ -2259,7 +2259,7 @@ $.widget('wcf.messageTabMenu', { */ _showTab: function(event, index, forceOpen) { var $index = (event === null) ? index : $(event.currentTarget).data('index'); - forceOpen = (!this.options.collapsible || forceOpen === true) ? true : false; + forceOpen = (!this.options.collapsible || forceOpen === true); var $target = null; for (var $i = 0; $i < this._tabs.length; $i++) {