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

Commit c667b54

Browse files
author
Robert Messerle
committed
fix(autocomplete): fixes autocomplete height when near the bottom of the page
Fixes #5209
1 parent b8ffdfe commit c667b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/autocomplete/js/autocompleteController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
103103
} else {
104104
styles.top = (top - offset) + 'px';
105105
styles.bottom = 'auto';
106-
styles.maxHeight = Math.min(MAX_HEIGHT, root.bottom - hrect.bottom - MENU_PADDING) + 'px';
106+
styles.maxHeight = Math.min(MAX_HEIGHT, root.bottom + $mdUtil.scrollTop() - hrect.bottom - MENU_PADDING) + 'px';
107107
}
108108

109109
elements.$.scrollContainer.css(styles);

0 commit comments

Comments
 (0)