EmailShareButton cannot open email in new window
Clicking on EmailShareButton removes the current page and replace it with Gmail (if that's what is set as the user's mail manager in browser).
It would be nice to have the possibility to open it in a new page.
@zozoens31 you can override the default prop of openWindow to true. By default it is set to false.
@hiradyazdan Any way to close the new window should the user's default email be an application rather than web-based? I'm finding stuff from here and here but unsure how to implement them with the current setup.
Note that in v4, openWindow param got renamed to openShareDialogOnClick
Setting openShareDialogOnClick does open the mailto in a popup, but the original page also handles the mailto so I end up with the same Gmail message in both windows.
Setting
openShareDialogOnClickdoes open the mailto in a popup, but the original page also handles the mailto so I end up with the same Gmail message in both windows.
I'm experiencing the same issue as this, has there been a fix deployed at all?
For those still having this issue, you can pass an empty onClick callback to the component to prevent the page from loading the Gmail window:
<EmailShareButton
onClick={() => {}}
openShareDialogOnClick
url={url}
>
...
</EmailShareButton>
For those still having this issue, you can pass an empty
onClickcallback to the component to prevent the page from loading the Gmail window:<EmailShareButton onClick={() => {}} openShareDialogOnClick url={url} > ... </EmailShareButton>
thanks so much your a life savior