-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Open
Labels
scope: vaporrelated to vapor moderelated to vapor mode
Description
Vue version
3.6.0-alpha.2
Link to minimal reproduction
Steps to reproduce
- click/touch anywhere in preview to move the small dot to your cursor
- add
vapor
to the component's script - click/touch again anywhere in the preview
What is expected?
the dot should move to the cursor position to the click/touch location in vapor mode just like in normal mode.
What is actually happening?
- the dot doesn't move
- the following warning is printed to the console when the component is mounted :
[Vue warn]: useCssVars is called without current active component instance.
System Info
Any additional comments?
The issue stems from the fact that getCurrentInstance()
returns null
in vapor mode, which short-circuits useCssVars
to an early returns with warning here :
core/packages/runtime-dom/src/helpers/useCssVars.ts
Lines 25 to 32 in e60edc0
const instance = getCurrentInstance() | |
/* v8 ignore start */ | |
if (!instance) { | |
__DEV__ && | |
warn(`useCssVars is called without current active component instance.`) | |
return | |
} | |
/* v8 ignore stop */ |
Metadata
Metadata
Assignees
Labels
scope: vaporrelated to vapor moderelated to vapor mode