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

Commit

Permalink
fix(autocomplete): fixes the sizing math
Browse files Browse the repository at this point in the history
Fixes #6212. Closes #7015.
  • Loading branch information
Robert Messerle authored and ThomasBurleson committed Feb 4, 2016
1 parent 03caf58 commit bc55ac9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/tabs/js/tabsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
function updatePagingWidth() {
var width = 1;
angular.forEach(getElements().dummies, function (element) {
width += Math.ceil(element.offsetWidth);
// uses `getBoundingClientRect().width` rather than `offsetWidth` to include decimal values
// when calculating the total width
width += Math.ceil(element.getBoundingClientRect().width);
});
angular.element(elements.paging).css('width', width + 'px');
}
Expand Down

0 comments on commit bc55ac9

Please sign in to comment.