-
Notifications
You must be signed in to change notification settings - Fork 100
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
[Vue-3] Cannot read property 'contains' of null at Proxy.focusIn #86
Comments
I am not sure if you are reporting a bug or asking the right way to use the component. But if you can make a minimal re-pro on js-fiddle or codesandbox, and write steps to re-produce the issue, would be helpful. Tip: Please use the component as described in docs. |
@ankurk91 kinda both, 'cause even if it's not supposed to happen due to inaccurate usage, imho it's better to check if element is not null. Check example. Steps to reproduce:
|
-<div v-show="active" class="loading-container">
+<div class="loading-container">
<div>
<Loading
v-model:active="active"
loader="dots"
:is-full-page="false"
/>
</div>
</div> Actually you no need to add Regarding, checking if |
It has been one year and no one has reported similar issue |
I've got multiple
Cannot read property 'contains' of null at Proxy.focusIn
errors at this line regardingthis.$refs.root
.Tell about your platform
Current behavior
Cannot read property 'contains' of null at Proxy.focusIn
errors in browser developer console.Expected behavior
No errors regarding nullish elements in browser developer console.
Minimal reproduction of the problem with instructions
I have vue-cli project and was getting this error only after building it and serving it at some domain.
I might have got this problem because of possibly wrong component usage such as following:
I thought I did not need v-model, cause custom component appearance was controlled by
loading
prop and Loading component was always active. After adding additional ref variable drived by loading prop, error is gone:Aftewards, I just wanted to know if v-model is required (even if only UI is needed in some cases) and propose to add some check to
this.$refs.root
.The text was updated successfully, but these errors were encountered: