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

IE11 rendering problem #144

Closed markholst closed 3 years ago

markholst commented 3 years ago

Hi there,

Firstly - thanks for providing this component, it's fantastic. I'm a big fan.

Unfortunately there's some kind of rendering issue under IE11, where the entire site will render as blank. There's nothing in the console window that suggests what the issue might be. It took me a little while to track it down to this library by progressively commenting out all code related to react-resize-detector.

I can reproduce by navigating to this page using IE11. (although, being IE11, it might not be rendering for other reasons). http://maslianok.github.io/react-resize-detector/

We're hosting a publicly accessible website that is by enterprise users, some small percentage of whom still use IE11. We're encouring many of them to move onto a modern browser, but it will continue to take time.

Can you please confirm this issue for us, and hopefully there is an easy fix involved?

Many thanks, Mark

maslianok commented 3 years ago

Hey @markholst,

Thank you for the feedback 👍

TBH, I didn't update live version for a while. Can you check it now? Does it work?

I'd like to emphasize that you should import from 'react-resize-detector/build/withPolyfill' in order to support old browsers such as IE11

markholst commented 3 years ago

Thanks mate, that resolved it. I was missing the /build/withPolyfill part. I think it's because I'm now using 'useResizeDetector' hook under v6 that it started to become a problem.

http://maslianok.github.io/react-resize-detector/ The demo site still didn't work, but I'm not upset about it :)