Fix issue 3916: width of filter bar in mobile.

This commit is contained in:
Slade Price
2019-11-14 15:32:15 -07:00
committed by Frédéric Guillot
parent dcdbd3758b
commit 5e6a9a89de
4 changed files with 24 additions and 3 deletions

View File

@@ -36,7 +36,12 @@ Kanboard.Dropdown.prototype.listen = function() {
}
if (offset.left + submenuWidth > $(window).width()) {
clone.css('left', offset.left - submenuWidth + $(this).outerWidth());
var newOffset = offset.left - submenuWidth + $(this).outerWidth();
// If calculated left offset is negative (off-screen), default to 15 pixels
if (newOffset < 0) {
newOffset = 15;
}
clone.css('left', newOffset);
}
else {
clone.css('left', offset.left);