From: Jean-Philippe Lang Date: Sat, 1 Oct 2016 08:55:56 +0000 (+0000) Subject: Tab buttons appear on pages that have no tabs (#23751). X-Git-Tag: 3.4.0~678 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=84ab16dcfe2866adedef428bbcc8e68bfb8efc20;p=redmine.git Tab buttons appear on pages that have no tabs (#23751). Patch by Edouard Cunibil. git-svn-id: http://svn.redmine.org/redmine/trunk@15853 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 64d3e8ea9..3d1ad43cd 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -385,7 +385,7 @@ function displayTabsButtons() { } }); var bw = $(el).parents('div.tabs-buttons').outerWidth(true); - if ((tabsWidth < el.width() - bw) && (lis.first().is(':visible'))) { + if ((tabsWidth < el.width() - bw) && (lis.length === 0 || lis.first().is(':visible'))) { el.find('div.tabs-buttons').hide(); } else { el.find('div.tabs-buttons').show().children('button.tab-left').toggleClass('disabled', numHidden == 0);