Skip to content

[BUG] Tooltip is not tracking trigger element when resizing window #1057

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

Closed
hurrmun opened this issue Jul 11, 2023 · 2 comments · Fixed by #1075
Closed

[BUG] Tooltip is not tracking trigger element when resizing window #1057

hurrmun opened this issue Jul 11, 2023 · 2 comments · Fixed by #1075
Labels

Comments

@hurrmun
Copy link
Contributor

hurrmun commented Jul 11, 2023

Bug description
resizing the window does not move the tooltip along with the anchor element

Version of Package
v5.18.0

To Reproduce
codesandbox: https://codesandbox.io/p/sandbox/react-tooltip-resize-tracking-mszsgp?file=%2Fsrc%2FApp.tsx%3A6%2C17

Expected behavior
Expected the tooltip to track the trigger element upon page resize

Desktop (please complete the following information if possible or delete this section):

  • OS: MacOS
  • Browser: Chrome
  • Frameworks [e.g. React 17/18, Vite]

Additional context
Not sure if this is considered a bug as the behaviour is not explicitly stated on the docs, but floating-ui seems to support the resize using autoUpdate and the library already tracks scrolling

@hurrmun hurrmun added the Bug label Jul 11, 2023
@gabrieljablonski
Copy link
Member

We indeed do not track page resize. We'll leave this open so we can try using autoUpdate() in the future.

Until then, my suggestion is to use closeOnResize.

@gabrieljablonski gabrieljablonski linked a pull request Jul 31, 2023 that will close this issue
@gabrieljablonski gabrieljablonski added the Awaiting merge Issue is fixed on a PR that will me merged soon. label Aug 2, 2023
@gabrieljablonski gabrieljablonski removed the Awaiting merge Issue is fixed on a PR that will me merged soon. label Aug 3, 2023
@gabrieljablonski
Copy link
Member

react-tooltip@v5.20.0 now uses floating-ui's autoUpdate() function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants