Any MeltUI and BitsUI modals that get triggered from inside of a node view component don't appear, in the example below I make a simple BlockFoo node view, the button element of the node view renders just fine, but when you click it a modal is supposed to open, but it doesn't.
Rendering this component outside of the editor has the correct behavior. Also, mounting the component manually inside of a regular node view (using Svelte's mount function) without using the adapter's nodeViewFactory has the correct behavior.
<!-- BlockFoo.svelte -->
<script lang="ts">
import { Combobox } from "melt/builders";
const combobox = new Combobox();
</script>
<div {...combobox.content} class="bg-blue-500">HELLO</div>
<button {...combobox.trigger} class="bg-red-500">Click Me</button>
// ...
// I register the node view like so:
block_foo: nodeViewFactory({
component: BlockFoo,
as: "div",
})
// ...
A weird thing I noticed is that when I trigger Vite's hot reload on the component (e.g. by changing bg-red-500 to bg-green-500), it suddenly gets the correct behavior. Though I don't think this is an issue with vite because if I just do vite build and serve dist/ the issue remains.
I can make an example project if you can't reproduce
Any MeltUI and BitsUI modals that get triggered from inside of a node view component don't appear, in the example below I make a simple
BlockFoonode view, thebuttonelement of the node view renders just fine, but when you click it a modal is supposed to open, but it doesn't.Rendering this component outside of the editor has the correct behavior. Also, mounting the component manually inside of a regular node view (using Svelte's
mountfunction) without using the adapter'snodeViewFactoryhas the correct behavior.A weird thing I noticed is that when I trigger Vite's hot reload on the component (e.g. by changing
bg-red-500tobg-green-500), it suddenly gets the correct behavior. Though I don't think this is an issue with vite because if I just dovite buildand servedist/the issue remains.I can make an example project if you can't reproduce