Using `visible` and `interactive` props together throws an error
See original GitHub issueWhen I try to use visible for controlling when the popover shows and interactive together throws an error. there seem to be in this part of code
// The popper element needs to exist on the DOM before its position can be
// updated as Popper needs to read its dimensions
if (!parentNode.contains(popper)) {
parentNode.appendChild(popper);
}
createTippy.ts:717 Uncaught TypeError: Cannot read property 'contains' of null
at mount (createTippy.ts:717)
at Object.show (createTippy.ts:1003)
at Tippy.js:154
at commitHookEffectListMount (react-dom.development.js:20573)
at commitLifeCycles (react-dom.development.js:20634)
at commitLayoutEffects (react-dom.development.js:23426)
at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
at invokeGuardedCallback (react-dom.development.js:4056)
at commitRootImpl (react-dom.development.js:23151)
at unstable_runWithPriority (scheduler.development.js:646)
at runWithPriority$1 (react-dom.development.js:11276)
at commitRoot (react-dom.development.js:22990)
at performSyncWorkOnRoot (react-dom.development.js:22329)
at react-dom.development.js:11327
at unstable_runWithPriority (scheduler.development.js:646)
at runWithPriority$1 (react-dom.development.js:11276)
at flushSyncCallbackQueueImpl (react-dom.development.js:11322)
at flushSyncCallbackQueue (react-dom.development.js:11309)
at flushPassiveEffectsImpl (react-dom.development.js:23620)
at unstable_runWithPriority (scheduler.development.js:646)
at runWithPriority$1 (react-dom.development.js:11276)
at flushPassiveEffects (react-dom.development.js:23447)
at flushDiscreteUpdates (react-dom.development.js:22356)
at flushDiscreteUpdatesIfNeeded (react-dom.development.js:3768)
at dispatchDiscreteEvent (react-dom.development.js:5886)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Using `visible` and `interactive` props together throws an error
When I try to use visible for controlling when the popover shows and interactive together throws an error. there seem to be in...
Read more >How passing props to component works in React
Master how to pass props (properties) to components in React with this useful beginner's guide, including demo code.
Read more >Error Handling in React 16 – React Blog
As React 16 release is getting closer, we would like to announce a few changes to how React handles JavaScript errors inside components....
Read more >Common mistakes with React Testing Library - Kent C. Dodds
If get* queries are unsuccessful in finding the element, they'll throw a really helpful error message that shows you the full DOM structure...
Read more >Layer Class - deck.gl
Under most circumstances, using visible prop to control the visibility of layers ... Used to propagate errors thrown in layers to the deck.gl...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I don’t really know what the issue is but I can say that
interactivewill append the tippy to the reference’s parentNode. So if that changes somehow, it might break. A suggestion is to use theappendToprop to append it to a constant element, like the root element of your app (note: implement keyboard focus etc. though).I’m actually having this same issue. Oddly enough, it works fine in the browser (in Storybook) with no errors, but fails when I run Jest Storyshots. My setup is identical to @sharno, except
visibleis set to true by default, and then toggled off via a close button: