-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Cannot read property 'getComputedStyle' of undefined #186
Comments
Happens to me as well when using the "bounds" property: |
It happens to me too, this is very problematic and I do not know what to do! I would appreciate a quick fix, thanks a lot! |
@anibali I ran into this same issue, did you end up fixing it? I too was able to fix it by reverting to an earlier version (2.1.2). |
@CaptainChemist I ended up reverting to the earlier version. I did some poking around in the console and found that the window object was available via the document, but I didn't actually make the change. The line I'm referring to is https://github.com/mzabriskie/react-draggable/blob/ac269435565fe584f0409345dcb79e8f5b682828/lib/utils/positionFns.es6#L21 Essentially |
Confirmed that this is the case for me as well. Reverting to 2.1.2 indeed fixed the issue. |
Any updates on this issue? |
+1 |
If you guys have an issue please submit a PR. |
Published in v2.2.1. Thanks. |
Version: react-draggable 2.2.0
Browser: Google Chrome Linux 51.0.2704.106 (64-bit)
Error:
Cannot read property 'getComputedStyle' of undefined
Source of error: https://github.com/mzabriskie/react-draggable/blob/ac269435565fe584f0409345dcb79e8f5b682828/lib/utils/positionFns.es6#L29
Looking a few lines up from the source of the error, I think that changing
to
might fix the problem. I've never used
defaultView
before though, and I'm not sure what is trying to be achieved with it, so take that with a pinch of salt.I have no problems with react-draggable 2.1.2.
The text was updated successfully, but these errors were encountered: