diff options
author | Jules Verhaeren <jules@julesverhaeren.nl> | 2016-02-09 23:31:06 +0100 |
---|---|---|
committer | Jules Verhaeren <jules@julesverhaeren.nl> | 2016-02-09 23:31:06 +0100 |
commit | 47336c43c1405931eded5b6fc82e513fb3dcdceb (patch) | |
tree | 3805f79b19307db7dfabb70638e6c1df8f36a5a1 /assets/js/src/Dropdown.js | |
parent | 3a44db6029fb2d833d75fbc70c424e3f9cb85d82 (diff) |
Fix for issue #1738
put forward by Busfreak
Diffstat (limited to 'assets/js/src/Dropdown.js')
-rw-r--r-- | assets/js/src/Dropdown.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/assets/js/src/Dropdown.js b/assets/js/src/Dropdown.js index 146a3c17..61738da9 100644 --- a/assets/js/src/Dropdown.js +++ b/assets/js/src/Dropdown.js @@ -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()) { |