sanity
sanity copied to clipboard
Nuxt Devtools and Visual Editing
Version
module: 1.9.0 nuxt: 3.10.3
What is expected?
To use the visual Editor feature
What is actually happening?
I get two errors:
client.mjs:41 Nuxt DevTools: Failed to check parent window
client.mjs:41 DOMException: Failed to read a named property '__NUXT_DEVTOOLS_DISABLE__' from 'Window': Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.
Steps to reproduce
Have both devtools and Sanity plugins enabled with Visual Editing set
Checklist
- [x] I have tested with the latest Nuxt version and the issue still occurs
- [x] I have tested with the latest module version and the issue still occurs
- [x] I have searched the issue tracker and this issue hasn't been reported yet
What is actually happening?
An error occurs when using with DevTools
Presumably you're able to use Visual Editing, but the devtools doesn't work within the Presentation iframe?
Correct @danielroe
@danielroe
another issue maybe related:
error caught during app initialization ReferenceError: useState is not defined
at useSanityVisualEditingState (visual-editing.mjs?v=41fb01d1:51:19)
another issue maybe related:
error caught during app initialization ReferenceError: useState is not defined at useSanityVisualEditingState (visual-editing.mjs?v=41fb01d1:51:19)
This is unrelated, but a fix for it went in v1.10.1
which should be published shortly.
another issue maybe related:
error caught during app initialization ReferenceError: useState is not defined at useSanityVisualEditingState (visual-editing.mjs?v=41fb01d1:51:19)
This is unrelated, but a fix for it went in
v1.10.1
which should be published shortly.
Gotcha, but the initial issue still remains
This is an upstream issue (or possibly limitation) in nuxt/devtools. It occurs whenever devtools is loaded within an iframe, such as within Stackblitz.
It would be worth raising upstream: https://github.com/nuxt/devtools/issues.