I have an absolutely-positioned div, and I\'m trying to keep track of when the mouse moves over it, and when the mouse leaves. Unfortunately clicking on the text in the box
Check if the primary button is pressed with MouseEvent.buttons.
tooltip.onmouseleave = (e) => { if (e.buttons !== 1) { console.log('tooltip mouse OUT') } }