improve dropdown open up/down mode. fixes #589
This commit is contained in:
parent
640e7066d9
commit
65af98cfed
@ -935,8 +935,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
height = this.container.outerHeight(false),
|
||||
width = this.container.outerWidth(false),
|
||||
dropHeight = this.dropdown.outerHeight(false),
|
||||
viewPortRight = $(window).scrollLeft() + document.documentElement.clientWidth,
|
||||
viewportBottom = $(window).scrollTop() + document.documentElement.clientHeight,
|
||||
viewPortRight = $(window).scrollLeft() + $(window).width(),
|
||||
viewportBottom = $(window).scrollTop() + $(window).height(),
|
||||
dropTop = offset.top + height,
|
||||
dropLeft = offset.left,
|
||||
enoughRoomBelow = dropTop + dropHeight <= viewportBottom,
|
||||
@ -948,8 +948,8 @@ the specific language governing permissions and limitations under the Apache Lic
|
||||
above,
|
||||
css;
|
||||
|
||||
// console.log("below/ droptop:", dropTop, "dropHeight", dropHeight, "sum", (dropTop+dropHeight)+" viewport bottom", viewportBottom, "enough?", enoughRoomBelow);
|
||||
// console.log("above/ offset.top", offset.top, "dropHeight", dropHeight, "top", (offset.top-dropHeight), "scrollTop", this.body().scrollTop(), "enough?", enoughRoomAbove);
|
||||
//console.log("below/ droptop:", dropTop, "dropHeight", dropHeight, "sum", (dropTop+dropHeight)+" viewport bottom", viewportBottom, "enough?", enoughRoomBelow);
|
||||
//console.log("above/ offset.top", offset.top, "dropHeight", dropHeight, "top", (offset.top-dropHeight), "scrollTop", this.body().scrollTop(), "enough?", enoughRoomAbove);
|
||||
|
||||
// fix positioning when body has an offset and is not position: static
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user