Merge pull-request #1814

This commit is contained in:
Frederic Guillot 2016-02-11 21:05:08 -05:00
commit d9d28adc20
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()) {