Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 2390d88

Browse files
Robert MesserleThomasBurleson
authored andcommitted
fix(autocomplete): fixes the sizing math
closes #6212 Closes #7015
1 parent 437b767 commit 2390d88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/tabs/js/tabsController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,9 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
545545
function updatePagingWidth() {
546546
var width = 1;
547547
angular.forEach(getElements().dummies, function (element) {
548-
width += Math.ceil(element.offsetWidth);
548+
// uses `getBoundingClientRect().width` rather than `offsetWidth` to include decimal values
549+
// when calculating the total width
550+
width += Math.ceil(element.getBoundingClientRect().width);
549551
});
550552
angular.element(elements.paging).css('width', width + 'px');
551553
}

0 commit comments

Comments
 (0)