tajo/react-portal

this.portal is null on IE11 - handleOutsideMouseClick()

hinok opened this issue · 3 comments

hinok commented

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

@hinok Yes. PR would be great!

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.

Hello @tajo could you check the PR?