Open tgolsson opened 2 years ago
I am also seeing this - It seems to happen for me when I have some elements that were created with tooltips and then I remove some of them from the DOM. The Tooltip onDestroy() - insertBefore is using "nonReactiveLocationStore.nextSibling" which is pointing to the element that was previously removed from the DOM causing insertBefore to crash.
FYI: Also wrapping the Wrapper with a div also seemed to resolved the issue. In this case the nonReactiveLocationStore.nextSibling was undefined, or it never got to that line.
@mwhebert Did you forget some code snippets in there? I'm guessing it was HTML and got stripped when posting. You might need to use a code block to ensure markdown doesn't to parse it.
```html
your code here
@mwhebert Did you forget some code snippets in there? I'm guessing it was HTML and got stripped when posting. You might need to use a code block to ensure markdown doesn't to parse it.
```html your code here
Thanks - I've updated the comment removing the angle brackets.
Describe the bug
I'm seeing crashes when a component using multiple Wrapper and Tooltip is being destroyed. The error message is:
and occurs here: https://github.com/hperrin/svelte-material-ui/blob/master/packages/tooltip/src/Tooltip.svelte#L320
It seems to me like it's related to elements being inside {#if} blocks. The code is about the following
This works fine until the component gets unmounted, at which point Tooltip will crash in the second Wrapper. There's no crash with a single Wrapper, or with only one tooltip.
This is the full callstack:
To Reproduce
This is the shortest repro I've been able to get: https://svelte.dev/repl/53b367ea32584baa9139eedcce75641f?version=3.48.0.
Unhelpfully, it generates this callstack:
Which is useless but matches above.
Desktop (please complete the following information):