Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip misalignment when scrolling #1227

Open
hemae opened this issue Sep 20, 2024 · 2 comments
Open

Tooltip misalignment when scrolling #1227

hemae opened this issue Sep 20, 2024 · 2 comments
Labels
Bug Stale This has not seen activity in quite some time

Comments

@hemae
Copy link

hemae commented Sep 20, 2024

Bug description
When using tooltips inside scrollable containers (specifically the window), the tooltip appears correctly next to the target element in the initial scroll state (see Screenshot 1). However, after scrolling the parent element (window), the tooltip appears misaligned—either above or below the target element (see Screenshot 2).

Version of Package
v5.28.0

To Reproduce

  • Add a tooltip to an element inside a scrollable window.
  • Observe correct tooltip positioning before any scrolling (Screenshot 1).
  • Scroll the page.
  • Observe the tooltip’s incorrect positioning after scrolling (Screenshot 2).

Expected behavior
The tooltip should remain aligned with the target element regardless of the scroll position.

Screenshots
Screen Shot 2024-09-20 at 3 22 57 PM
Screen Shot 2024-09-20 at 3 23 03 PM

Desktop:

  • OS: macOS Monteray 12.6.1
  • Browser: Google Chrome
  • Version 128.0.6613.139 (Official Build) (x86_64)
  • Frameworks: React 17.0.2
@hemae hemae added the Bug label Sep 20, 2024
@gabrieljablonski
Copy link
Member

Have you tried moving the tooltip component inside the scrollable parent? That usually fixes the issue, but depending on your project's structure, it might not be viable for you to do.

Let me know, and I'll try to suggest some other approach.

Copy link

This issue is stale because it has not seen activity in 30 days. Remove the stale label or comment within 14 days, or it will be closed.

@github-actions github-actions bot added the Stale This has not seen activity in quite some time label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Stale This has not seen activity in quite some time
Projects
None yet
Development

No branches or pull requests

2 participants