Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone devtools not working when app is mounted to body + top-level await #750

Open
ferferga opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ferferga
Copy link

My app is mounted to document.body directly, which in itself does not cause an issue with DevTools. However, I also use top-level await, which delays the mounting process until all the promises have been resolved. This order of events cause a race condition, where DevTools is mounted before the app and it get's replaced by Vue after mounting

Expected behaviour

Devtools should be mounted after it detects that all the other apps are also mounted to avoid being overwritten (we can't stop the user from manipulating the DOM, so I think it's a sensible middleground).

Reproduction

https://stackblitz.com/edit/vue3-vite-typescript-starter-jkegp2zi?file=src%2Fmain.ts

@alexzhang1030 alexzhang1030 added the bug Something isn't working label Dec 20, 2024
@LukerSpringtree
Copy link
Contributor

@alexzhang1030 I will give a PR.
But this bug the main reason is the root is the document.body.
Should we support this scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants