From 0a70e48fd77b17ac95ee93277e07867cd4a96e54 Mon Sep 17 00:00:00 2001 From: Frank Meyer Date: Mon, 5 Oct 2015 14:52:21 +0200 Subject: [PATCH] fix(mdTabs): Tab label width correction in mdDialog The Tab label width is set correctly when used in a dialog. Changed one line to a previous version (1 commit prior to 4a16038be56b285fdc2c7cbdfcd8853d65408b21) That commit addressed issue #4743. This issue is not reproduced by reverting this line of code. Addressing issues #4834 #4873 #4744 --- src/components/tabs/js/tabsController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/tabs/js/tabsController.js b/src/components/tabs/js/tabsController.js index 2b6937a9ffd..122a16bdaf2 100644 --- a/src/components/tabs/js/tabsController.js +++ b/src/components/tabs/js/tabsController.js @@ -486,7 +486,7 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp */ function shouldPaginate () { if (ctrl.noPagination || !loaded) return false; - var canvasWidth = $element.prop('clientWidth'); + var canvasWidth = Math.min($element.prop('clientWidth'), ctrl.maxTabWidth); angular.forEach(elements.dummies, function (tab) { canvasWidth -= tab.offsetWidth; }); return canvasWidth < 0; }