Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Change notransition technique #454

Merged
merged 2 commits into from
Mar 24, 2019
Merged

Change notransition technique #454

merged 2 commits into from
Mar 24, 2019

Conversation

atomiks
Copy link
Owner

@atomiks atomiks commented Mar 24, 2019

Fixes atomiks/tippyjs-react#67

Changes the "notransition" technique which fixes undesirable transitions when the tippy changes placements on updates.

Before: add a transition: none CSS class on the tippy once onShown() completes

After: use some instance flags to check if the previous placement is the same and if the previous update happened while the tippy was visible. If so, disable transitions for a single frame before painting. This is a better way to do it anyway and it fixes the problem linked

(going to be deleting the comments describing the variables after this as they're quite redundant, that's why I didn't add any here)

@atomiks atomiks merged commit 1e6b81c into master Mar 24, 2019
@atomiks atomiks deleted the change-notransition branch March 24, 2019 01:58
@Lazyuki
Copy link

Lazyuki commented Mar 26, 2019

@atomiks Thanks for the quick fix! I assume this will be included in tippy.js@4.2.1, but since tippy.js-react depends on tippy.js^4.0.4 right now, could you update it to tippy.js^4.2.0?

@atomiks
Copy link
Owner Author

atomiks commented Mar 26, 2019

@Lazyuki that semver range means when you update @tippy.js/react you'll get the latest tippy.js version anyway.

Run

npm i @tippy.js/react@latest

in your project. I'm going to release this patch today

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

Successfully merging this pull request may close these issues.

Tooltip jumps when trigger='manual' and hideOnClick=false
2 participants