I am creating a plugin for mattermost.
I used ReactDOM.createPortal() and opening a new window inside the portal using window.open().
On click of a button, a new window is opening in web with the component which i mount to the window.
But somehow, this functionality is not working in desktop application.
I tried it on windows desktop application.
TypeError: Cannot read property 'document' of null
Uncaught (in promise) TypeError: Cannot read property 'document' of null
It logs these 2 errors in Developer Tool for windows application and the Mattermost application crashes after it.
Also shows popup of windows store to look for a new tool to open it .
Please let me know in case i am missing something out.
I have posted a question on another forum to get some idea about it with a code snippet.
Please check here in case you need to know what i am doing in my code.
After I build the plugin, this works fine in web-browser but not in windows application.