소스 검색

fixed dropdown alignment in firefox. still need to test IE. #214

Igor Vaynberg 13 년 전
부모
커밋
3ed2cc091a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -717,7 +717,7 @@
                 height = this.container.outerHeight(),
                 width = this.container.outerWidth(),
                 dropHeight = this.dropdown.outerHeight(),
-                viewportBottom = document.body.scrollTop + document.documentElement.clientHeight,
+                viewportBottom = $(window).scrollTop() + document.documentElement.clientHeight,
                 dropTop = offset.top + height,
                 enoughRoomBelow = dropTop + dropHeight <= viewportBottom,
                 enoughRoomAbove = (offset.top - dropHeight) >= document.body.scrollTop,