react-selectrix icon indicating copy to clipboard operation
react-selectrix copied to clipboard

Unable to get property 'contains' of undefined or null reference

Open gitlukasz opened this issue 6 years ago • 1 comments

Issue description Our application consists of 2 screens:

  • landing page with list of items
  • item details page - has form fields (including react-selectrix component) and OK button to go back to landing page When OK button is clicked we go back to the landing page and the items details page disappears. In IE11 we can see an error message in the console: "Unable to get property 'contains' of undefined or null reference".

Additional details: The error comes from handleBodyClick method in the App class. Probably the handler is executed after items detail page (and react selectrix-component) disappears from DOM. I think that additional check is required to ensure that this.ref points valid DOM element.

gitlukasz avatar Oct 30 '18 08:10 gitlukasz

Hi, thanks for spotting this. I will test and release a new version as soon as possible.

Best Regards

stratos-vetsos avatar Nov 01 '18 13:11 stratos-vetsos