1
0
mirror of synced 2024-11-26 14:56:07 +03:00

improve dropdown open up/down mode. fixes #589

This commit is contained in:
Igor Vaynberg 2013-02-09 00:08:38 -08:00
parent 640e7066d9
commit 65af98cfed

View File

@ -935,8 +935,8 @@ the specific language governing permissions and limitations under the Apache Lic
height = this.container.outerHeight(false), height = this.container.outerHeight(false),
width = this.container.outerWidth(false), width = this.container.outerWidth(false),
dropHeight = this.dropdown.outerHeight(false), dropHeight = this.dropdown.outerHeight(false),
viewPortRight = $(window).scrollLeft() + document.documentElement.clientWidth, viewPortRight = $(window).scrollLeft() + $(window).width(),
viewportBottom = $(window).scrollTop() + document.documentElement.clientHeight, viewportBottom = $(window).scrollTop() + $(window).height(),
dropTop = offset.top + height, dropTop = offset.top + height,
dropLeft = offset.left, dropLeft = offset.left,
enoughRoomBelow = dropTop + dropHeight <= viewportBottom, enoughRoomBelow = dropTop + dropHeight <= viewportBottom,