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

Commit 46e08e5

Browse files
authored
Revert "fix(autocomplete): show dropdown on top only when there is room" (#11626)
This reverts commit a37f7cc. Creating this PR to investigate failure in google3 possibly caused by the reverted change
1 parent e64875d commit 46e08e5

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
@@ -143,7 +143,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
143143

144144
// Automatically determine dropdown placement based on available space in viewport.
145145
if (!position) {
146-
position = (vrect.top + MENU_PADDING > dropdownHeight) ? 'top' : 'bottom';
146+
position = (top > bot && root.height - top - MENU_PADDING < dropdownHeight) ? 'top' : 'bottom';
147147
}
148148
// Adjust the width to account for the padding provided by `md-input-container`
149149
if ($attrs.mdFloatingLabel) {

0 commit comments

Comments
 (0)