Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(tooltip): tooltip will no longer be pushed up if there is room fo…
Browse files Browse the repository at this point in the history
…r it within its `offsetParent`
  • Loading branch information
Robert Messerle committed Mar 18, 2015
1 parent 00f4cc6 commit 6e576c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function MdTooltipDirective($timeout, $window, $$rAF, $document, $mdUtil, $mdThe
// Otherwise, recalculate based on 'top' since default is 'bottom'
if (direction) {
newPosition = fitInParent(newPosition);
} else if (newPosition.top > tooltipParent.prop('scrollHeight') - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE) {
} else if (newPosition.top > element.prop('offsetParent').scrollHeight - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE) {
newPosition = fitInParent(getPosition('top'));
}

Expand Down

0 comments on commit 6e576c0

Please sign in to comment.