maslianok / react-resize-detector

A Cross-Browser, Event-based, Element Resize Detection for React
http://maslianok.github.io/react-resize-detector/
MIT License
1.25k stars 91 forks source link

Width is incorrect when device is rotated #187

Closed JoshuaVSherman closed 2 years ago

JoshuaVSherman commented 2 years ago

I am on ipad mode in chrome, I am console logging the width, when not rotated it is correct, but when I rotate the device, the width is not correct, am I doing something wrong or is this a bug? screenshot: image

link to code example https://github.com/WebJamApps/CollegeLutheran/blob/develop/src/containers/LiveStream/index.tsx

maslianok commented 2 years ago

I copied the source you provided and it seems everything works as expected: https://j7jlz.csb.app/

On the screenshot above you have a separate panel on the right side. I think it's excluded from the container you're observing...

Let me know if you have any additional questions