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

passing popperOptions: undefined crashes page #62

Closed
robjtede opened this issue Mar 1, 2019 · 4 comments
Closed

passing popperOptions: undefined crashes page #62

robjtede opened this issue Mar 1, 2019 · 4 comments

Comments

@robjtede
Copy link

robjtede commented Mar 1, 2019

NB: This seems to be an issue within tippy itself but I thought I'd make an issue here in case a check/default on the component side is enough.

I created a wrapper around Tippy to provide custom defaults but found that the page became unresponsive when hovering over the target element; page using 100% cpu according to devtools. This started recently, so possibly a tippy v4 regression.

Since the wrapper passes undefined to Tippy when it is not explicitly set by the component, it is necessary to use {} as the default param.

Working:

<Tippy content="hello">
  <span>works</span>
</Tippy>

Breaking:

<Tippy content="hello" popperOptions={undefined}>
  <span>breaks</span>
</Tippy>
@atomiks
Copy link
Owner

atomiks commented Mar 1, 2019

This probably broke it: atomiks/tippyjs@294351a

Would need a check popperOptions && popperOptions.onUpdate

@robjtede
Copy link
Author

robjtede commented Mar 1, 2019

wouldn't that throw if popperOptions was undefined there?

@atomiks
Copy link
Owner

atomiks commented Mar 1, 2019

It's a destructured property higher in the scope.

Is this high priority or can you set it as an object explicitly instead of undefined for now?

@robjtede
Copy link
Author

robjtede commented Mar 1, 2019

no, not urgent, this is easily solved by just using {} as the default prop

junglerot added a commit to junglerot/jungle that referenced this issue Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants