node.offsetParent is sometimes null and messes up with positioning
continuation of #381 , after doing lots of debugging I can see that node.offsetParent sometimes returns null in getControlPosition() helper function.
console.log(node); // constantly returns `react-resizable-handle` dom element
console.log(node.offsetParent); // but this is null sometimes

Can you track down when it is null?
vpezeshkian mailto:[email protected] November 1, 2016 at 11:28 AM
continuation of #381 https://github.com/STRML/react-grid-layout/issues/381 , after doing lots of debugging I can see that |node.offsetParent| sometimes returns |null| in |getControlPosition()| helper function.
console.log(node); // constantly returns
react-resizable-handledom element console.log(node.offsetParent); // but this is null sometimes
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/STRML/react-grid-layout/issues/395, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJFP1Y71GcBxFbf4bcBnAUoRoNVaMM8ks5q52iZgaJpZM4KmSTS.
I'm sure that handleDragStart picks it right, then on first px move handleDrag returns the correct values, but on 2nd px move it's null... how can I go deeper in debugging?
If you can get a jsfiddle going that replicates it, that would be best - otherwise set some breakpoints & step through it.
vpezeshkian mailto:[email protected] November 1, 2016 at 11:49 AM
I'm sure that |handleDragStart| picks it right, then on first px move |handleDrag| returns the correct values, but on 2nd px move it's |null|... how can I go deeper in debugging?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/STRML/react-grid-layout/issues/395#issuecomment-257620758, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJFPyvsISTF8r6Wna-q5gKKTvEjTl5Mks5q522lgaJpZM4KmSTS.
vpezeshkian mailto:[email protected] November 1, 2016 at 11:28 AM
continuation of #381 https://github.com/STRML/react-grid-layout/issues/381 , after doing lots of debugging I can see that |node.offsetParent| sometimes returns |null| in |getControlPosition()| helper function.
console.log(node); // constantly returns
react-resizable-handledom element console.log(node.offsetParent); // but this is null sometimes
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/STRML/react-grid-layout/issues/395, or mute the thread https://github.com/notifications/unsubscribe-auth/ABJFP1Y71GcBxFbf4bcBnAUoRoNVaMM8ks5q52iZgaJpZM4KmSTS.
This can be closed now... the issue was in css where i had touched z-index of placeholder, so on resize it would sometimes be on top of the drag item and that's why node.offsetParent would be null. Reset the css to master and it's fine... 🏭