question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltip with hover trigger not working on page with scrollbar

See original GitHub issue

Describe the bug When mouse enters trigger element and page has vertical scrollbar and his position is not at top of page then tooltip is flickering and does not remain visible. Problem is probably with function mouseOutsideRect and comparing mouse and trigger position: (pageY || clientY) < Math.floor(top) || (pageY || clientY) > Math.ceil(bottom).

To Reproduce Steps to reproduce the behavior: https://codesandbox.io/s/white-leaf-094it?file=/src/index.js https://user-images.githubusercontent.com/18634735/108426708-613e2900-723c-11eb-924b-b7b9096d97dc.mov

Expected behavior Tooltip should remain visible after hover button.

Desktop (please complete the following information):

  • OS: macOS
  • Browser chrome
  • Version 88

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
b0hdycommented, Feb 23, 2021

@mohsinulhaq works well, thank you.

1reaction
mohsinulhaqcommented, Feb 22, 2021

@czabaj thanks for filing it, I was thinking the same, but I thought first I would consult StackOverflow. But there was no reply, so I guess, no problem.

Btw, shouldn’t we add/subtract 1 only for Chrome?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover tooltip stops working after scrolling - Stack Overflow
The main problem is, your tooltip is insite an element with display:fixed style. When you change the tooltip's position, it counts the top...
Read more >
Hovering over a tooltip trigger scrolls page to top #140 - GitHub
When I hover over the button that has the tooltip class on it for ... Even changing it from an anchor tag to...
Read more >
Tooltip does not disappear when scrolling - GitLab.org
Hover over a link with a tooltip. Click the link. Use the browser back button. Observe that the tooltip is now a permanent...
Read more >
JavaScript · Bootstrap
If a function is given, it will be called with its this reference set to the element that the tooltip is attached to....
Read more >
Tooltipster - The jQuery Tooltip Plugin - GitHub Pages
The easiest way to set when a tooltip should open or close is to set the trigger option to one of the two...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found