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

Commit a4ea9de

Browse files
author
Robert Messerle
committed
fix(tabs): tabs will not try to animate height if the new height matches the current height
1 parent 8d7ec06 commit a4ea9de

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
@@ -643,7 +643,9 @@ function MdTabsController ($scope, $element, $window, $mdConstant, $mdTabInkRipp
643643
contentHeight = tabContent ? tabContent.offsetHeight : 0,
644644
tabsHeight = elements.wrapper.offsetHeight,
645645
newHeight = contentHeight + tabsHeight,
646-
currentHeight = $element.prop('offsetHeight');
646+
currentHeight = $element.prop('clientHeight');
647+
648+
if (currentHeight === newHeight) return;
647649

648650
// Adjusts calculations for when the buttons are bottom-aligned since this relies on absolute
649651
// positioning. This should probably be cleaned up if a cleaner solution is possible.

0 commit comments

Comments
 (0)