tajo / react-portal

🎯 React component for transportation of modals, lightboxes, loading bars... to document.body or else.
MIT License
2.14k stars 169 forks source link

this.portal is null on IE11 - handleOutsideMouseClick() #197

Closed hinok closed 4 years ago

hinok commented 6 years ago

Hey, We have a case in one of our applications where this error appears only on IE 11. It doesn't appear on any other browser and it's quite hard to debug on IE11 🗡

The quickest fix is to check if this.portal exists, @tajo what do you think? Beside that even if this error is reported, everything seems to work correctly.

screen

I can prepare PR if you want.

tajo commented 6 years ago

@hinok Yes. PR would be great!

v1adko commented 6 years ago

I'm having the same issue, but not on IE. Maybe the issue is with the usage of the component PortalWithState. In my use case I've wrapped a portal with a fullscreen backdrop and I can't close the modal on outside click due to this error.

odelijairo commented 4 years ago

Hello @tajo could you check the PR?