From c1c642165840907c58734cd8d1c3e8af8bc2cbbe Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 14 Sep 2016 11:04:00 +0200 Subject: [PATCH] Disable auto-open of message tabs for small devices --- wcfsetup/install/files/js/WCF.Message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) { -- 2.20.1