Fix for issue #1738

put forward by Busfreak
This commit is contained in:
Jules Verhaeren 2016-02-09 23:31:06 +01:00
parent 3a44db6029
commit 47336c43c1
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -26,11 +26,11 @@ Dropdown.prototype.listen = function() {
var submenuHeight = clone.outerHeight();
var submenuWidth = clone.outerWidth();
if (offset.top + submenuHeight - $(window).scrollTop() > $(window).height()) {
clone.css('top', offset.top - submenuHeight - 5);
if (offset.top + submenuHeight - $(window).scrollTop() < $(window).height() || $(window).scrollTop() + offset.top < submenuHeight) {
clone.css('top', offset.top + $(this).height());
}
else {
clone.css('top', offset.top + $(this).height());
clone.css('top', offset.top - submenuHeight - 5);
}
if (offset.left + submenuWidth > $(window).width()) {