Prevent tooltips from going off the side of popups

This commit is contained in:
Nathan Gray 2014-11-27 17:38:37 +00:00
parent 48c8b1de74
commit bcc3499c4c

View File

@ -73,7 +73,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd) {
var tooltip_height = tooltip_div.height();
if (space_left.right < tooltip_width) {
tooltip_div.css('left', cursor_rect.left - tooltip_width);
tooltip_div.css('left', Math.max(0,cursor_rect.left - tooltip_width));
} else if (space_left.left >= tooltip_width) {
tooltip_div.css('left', cursor_rect.right);
} else {