From 84ab16dcfe2866adedef428bbcc8e68bfb8efc20 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 1 Oct 2016 08:55:56 +0000 Subject: [PATCH] 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 --- public/javascripts/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5