-
Notifications
You must be signed in to change notification settings - Fork 28
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
TypeError before using v-drag #17
Comments
Try importing v-drag from import drag from 'v-drag';
// OR
import drag from 'v-drag/dist/main'; |
Tried that first, got an error, and switched to
Also the same with |
Just to be clear, this error appears on page load but it disappears when you start dragging an element? |
That is correct. |
I'm not getting this error as If that's your version, can you please import v-drag from export default function (transform, left, top) {
if (window.data.move) {
window.data.move.style.transform = transform;
window.data.move.style.left = left;
window.data.move.style.top = top;
}
} If this fixes it, I will push an update right now |
Yes, I'm using 2.1.3. You suggestion fixed the issue but I then got another one:
I'm using Vue to sprinkle some magic on a server-side rendered page if that matters. |
Do you mind sharing your full code? |
I can not share the entire code, but I can reproduce it with a bare bones setup:
|
I'm still not getting your error. Can you drag the element even if this error appears? |
Yes, I can drag it so everything works fine except for the error message. |
Okay, so in this case I'm gonna leave the issue open and i will look deeper into it sometime in the future. Thanks for reporting this issue :) |
Sounds good, thanks! |
I get the exact same error. And when adding the "if" statement I also get the "classList" error. |
Closing this issue, as it was fixed with pull request #23 |
After adding v-drag to an element we seem to be getting the following error before clicking the element. After clicking the error disappears.
Out setup is fairly simple:
The text was updated successfully, but these errors were encountered: