Cannot read property 'getComputedStyle' of undefined
See original GitHub issueVersion: 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
const ownerWindow = node.defaultView;
to
const ownerWindow = ownerDocument.defaultView;
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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:9
Top Results From Across the Web
Cannot read property 'getComputedStyle' of undefined · Issue ...
when I close or navigate from one page that has a form to another page this error shows: TypeError: Cannot read property 'getComputedStyle' ......
Read more >Cannot read property 'getComputedStyle' of undefined ckeditor
I found the problem. It was a problem with a jquery plugin mscustomscrollbar. To resolve this I deleted the plugin and used css3...
Read more >Getting 'getComputedStyle' of undefined an 'select' of null on ...
Uncaught TypeError : Cannot read property 'getComputedStyle' of undefineda.getComputedStyle.Ib @ jquery-1.11.1.min.js:3a.getComputedStyle.
Read more >Cannot read property 'getComputedStyle' of undefined ckeditor
I use ckeditor on my website, and from time to time when I load my page I get this error which blocks the...
Read more >How To Fix Cannot Read Property 'style' of Null in JavaScript
This error boils down to one problem. The element you are trying to access does not exist in the DOM (document object model)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Happens to me as well when using the “bounds” property:
<ReactDraggable bounds="body" handle=".dashboard-panel-header" onStart={ @focusPanel } onClick={ @focusPanel } >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!