Tooltip hover not working properly in Firefox

Hello,

I ran into an issue where the tooltip would be placed vertically higher than it should have been, but only in FireFox. This effect got worse the further down the task was.

[code]gantt._tooltip_pos = function (ev) {
if (ev.pageX || ev.pageY)
var pos = { x: ev.pageX, y: ev.pageY };

var d = _isIE || _isFF ? document.documentElement : document.body;
var pos = {
    x: ev.clientX + d.scrollLeft - d.clientLeft,
    y: ev.clientY + d.scrollTop - d.clientTop
};

var box = gantt._get_position(gantt.$task_data);
pos.x = pos.x - box.x;
pos.y = pos.y - box.y;
return pos;

};[/code]

I included _isFF when setting the var d and it fixed my issue.

Figured you guys would like to know,

Cheers!

[code]if (navigator.userAgent.toLowerCase().indexOf(‘chrome’) > -1)
_isChrome = true;

if ((navigator.userAgent.indexOf(‘Safari’) != -1) || (navigator.userAgent.indexOf(‘Konqueror’) != -1)) {
_KHTMLrv = parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf(‘Safari’) + 7, 5));

if (_KHTMLrv > 525) { //mimic FF behavior for Safari 3.1+
    _isFF = true;
    _FFrv = 1.9;
} else
    _isKHTML = true;

} else if (navigator.userAgent.indexOf(‘Opera’) != -1) {
_isOpera = true;
_OperaRv = parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf(‘Opera’) + 6, 3));
}

else if (navigator.appName.indexOf(“Microsoft”) != -1) {
_isIE = true;
if ((navigator.appVersion.indexOf(“MSIE 8.0”) != -1 ||
navigator.appVersion.indexOf(“MSIE 9.0”) != -1 ||
navigator.appVersion.indexOf(“MSIE 10.0”) != -1 ||
document.documentMode > 7) &&
document.compatMode != “BackCompat”) {
_isIE = 8;
}
} else if (navigator.appName == ‘Netscape’ && navigator.userAgent.indexOf(“Trident”) != -1) {
//ie11
_isIE = 8;
} else {
_isFF = true;
_FFrv = parseFloat(navigator.userAgent.split(“rv:”)[1])
}[/code]

Now I am running into the issue of _isFF being true if a user is in chrome. _isFF = true; is being hit so both _isChrome and _isFF is true. Just figured I’d give a heads up.

Hi,
does it happens always, or only on some particular page?
I’ve just checked tooltips on this page in FF v41.0.1 docs.dhtmlx.com/gantt/samples/02 … oltip.html
All seemed working ok, but probably I’m missing something

It looks like it was occuring because we were also including

gantt.config.tooltip_offset_y = 20;