frappe / gantt

Open Source Javascript Gantt
https://frappe.io/gantt
MIT License
4.6k stars 1.02k forks source link

Firefox: tooltip is out of screen #398

Open gdebrion opened 3 months ago

gdebrion commented 3 months ago

In bar.js

$.on(this.group, "mouseenter", (e) => timeout = setTimeout(() => {
  this.show_popup(e.offsetX)
  document.querySelector(`#highlight-${task_id}`).style.display = 'block'
}, 200))

But in Firefox e.offsetX is equal to 0 :disappointed: So the tooltip is displayed with left: 0px and is not visible.

This works fine with Chrome.

How to make offsetX works?