SSR problem in vue.draggable context
See original GitHub issueProblem:
Hello @owen-m1 , version 1.1.0.0 of sortable.js introduced a call to navigator
global property.
This is breaking SSR usage of vue.draggable: building the template on the server-side using node (none browser context).
I tried a fix to require sortable.js only in browser context (https://github.com/SortableJS/Vue.Draggable/issues/724), but it seems
- not to cover all scenarios (see discusrion on https://github.com/SortableJS/Vue.Draggable/issues/724)
- to introduce regressions (https://github.com/SortableJS/Vue.Draggable/issues/731, https://github.com/SortableJS/Vue.Draggable/issues/730, https://github.com/SortableJS/Vue.Draggable/issues/728)
I can not think of another fix on vue.draggable side thougth. Could it be possible to check for navigator early in sortable.js to avoid to raise exception when navigator is not defined?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:29 (17 by maintainers)
Top Results From Across the Web
Vue Draggable Recursive / Nested Dragging Weird Behavior
Moves the parent and it's parent somewhere else where I drag it, but leaves the child where it was i.e image Initial state...
Read more >Vue Cal - GitHub Pages
Resize an event by dragging the resizer handle. Not available if no timeline, not possible on background events. Drag & drop an event...
Read more >[Solved]-vue-js-modal - "draggable" issue-Vue.js
Try from scratch from my code example below Install the library as: npm install --save vue-js-modal. The following works fine (tested):
Read more >Making Nuxt.js clone with Vue 3 and Vite (Vue Custom ...
At the time of calling the store in asyncData, pass pinia there from the application context, otherwise there will be problems when rendering...
Read more >QImg
The QImg Vue component makes working with responsive images easy and also adds a nice loading effect to them along with many other...
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
@UnaiRA I will release 1.10.1 tonight.
@UnaiRA @stuta Please try building commit 576e33540c545dcefe0d805754ac2f454b55538f and tell me if it fixes the problem. I just made it so that Sortable will not throw any errors on import if the window or document is not defined. Obviously it won’t work properly unless it is imported in a browser context, but this has always been the behaviour of Sortable.