-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[@mantine/core] Floating Tooltip: position bug at the extremeties #1219
Conversation
… instead of popper
I think Popper should be removed entirely from there, since it does not really do anything |
Yeah, that's true. I'll do that then. Edit: Well, it looks like Popper still handles the transition, transition duration, zIndex, and handling the |
return { | ||
left: x || 0, | ||
top: y || 0, | ||
}; | ||
} | ||
}, [x, y]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would adding the positionDependencies
prop to the dependency array here effectively be the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not really know, never dug deep into FloatingTooltip component as it was contributed. If it works, then it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I contributed it after all! So I guess I know best then 😄?!
I added it back, and spread it into the dependency array, so the position will be recalculated if one of those dependencies changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, let's hope that it will fix it then
Thanks! |
Thanks for the fix guys! |
* [@mantine/hooks] use-fullscreen: custom ref state (#1212) * [@mantine/hooks] use-fullscreen: custom ref state Added a check to ensure a custom ref element toggles the fullscreen state * fixed the prettier issue * [@mantine/core] FloatingTooltip: Fix position bugs at the extremeties (#1219) * [@mantine/core] Select: only use open/close callback when value changes * [@mantine/core] Select: do not use early return * [@mantine/core] Tooltip: floating tooltip positioned inside component instead of popper * [@mantine/core] Tooltip: revert positions story back * [@mantine/core] Tooltip: remove popper from floating tooltip * [@mantine/core] Tooltip: fix floating tooltip test, add position deps to coordinates array * [@mantine/core] Tooltip: remove extra div * [@mantine/nprogress] Init * Fix all review issues * Switch from context api to event * Add docs * Updated prop names and fixed some bugs * Added reducedMotion * Updated interval Co-authored-by: Elton Gonçalves Gomes <eltongonc@gmail.com> Co-authored-by: Wesley Moses <wesmoses@gmail.com>
Moves the positioning of the tooltip logic inside the floating tooltip, rather than the Popper component.
Resolves #1126