-
Notifications
You must be signed in to change notification settings - Fork 38
Carousel interferes with routing (likely in latest Sapper version 0.27.0) #35
Comments
This breaks the route(target path) too. |
WorkarroundReplace the detach function on line 174 of
|
I think a workaround which involves modifying the framework probably isn't ideal! Not at all sure why this is broken suddenly. Do we know what the last working version of Sapper was? |
i havent been able to look into this too deeply, but i'm having the same problem. I have a feeling the |
I am having this problem; the workaround by @itswadesh solves locally but when I deploy for production breaks sapper's routing. Please Help! |
This may be a bug in Svelte sveltejs/svelte#3187 An easier workaround is to contain the carousel in a parent div/element:
|
If that fixes it then it's very easy for us to just add that wrapper inside the component I think. |
@antony The issue is that Svelte is trying to destroy the parent node of (presumably) the first parent in the component. I've tried adding a parent node to the component onDestroy(), but I don't understand enough of the Svelte process to get it right.. i.e. how it targets the component to destroy EDIT: To be clearer - that's what I thought too but it doesn't seem to work! Only outside the component.. |
I have the same problem on Laravel + Inertia + Svelte, @bugbit-io 's solution solved it perfectly. Thank you! |
At the moment I can only give a console error:
TypeError: node.parentNode is null
when changing routes. The carousel works fine, it's just the routing that's an issue when using Sapper.I'll see what else I can dig up around it.
The text was updated successfully, but these errors were encountered: