diff --git a/src/uiSelectDirective.js b/src/uiSelectDirective.js index 0f537d196..bab680f9f 100644 --- a/src/uiSelectDirective.js +++ b/src/uiSelectDirective.js @@ -273,7 +273,7 @@ uis.directive('uiSelect', var offsetDropdown = uisOffset(dropdown); // Determine if the direction of the dropdown needs to be changed. - if (offset.top + offset.height + offsetDropdown.height > $document[0].documentElement.scrollTop + $document[0].documentElement.clientHeight) { + if (offset.top + offset.height + offsetDropdown.height > $document.scrollTop() + $document[0].documentElement.clientHeight) { dropdown[0].style.position = 'absolute'; dropdown[0].style.top = (offsetDropdown.height * -1) + 'px'; element.addClass(directionUpClassName);