react-share
react-share copied to clipboard
Email Share is not working
As I click on the Email Icon for the demo at https://nygardk.github.io/react-share/, nothing happens. It appears to be a bug
not working for me either
EDIT:
mailto: links don't work for me in general. Probably my chrome settings, or maybe even default chrome settings do not allow opening of mailto.
Works fine for me on Safari MacOS 11.6
The demo works for me, but when i implemented it stopped working even though all other sharing services where working and were all doing the same thing --> onClick={() => myOwnHandleClick(serviceName)).
But i discovered that the email share button works a bit differently. It has its own onClick (which creates the necessary href to share with mailto:) and when you give it your own onClick it basically overrides the default onClick which does the magic.
So when implementing your own, you need to re-implement the href logic.
<EmailShareButton
url={url}
className={classes.icon}
onClick={(_, link) => {
window.location.href = link; // does the same as the default onClick
yourOwnOnClick(...); // your function
}}
>
<EmailIcon size={ICON_SIZE} round />
</EmailShareButton>
It probably needs a refactor to do the window.location.href = ... even when specifying a new onClick. At least mention it in the README.
Thanks, it's work
This bit me too, the fact it works differently from the rest is unexpected and easy to go unnoticed.
I tried setting the Open Dialogue to true, but then an email message opens in the current tab as well as in the popup dialogue. This is on Chrome w/ MacOS Monterey. I only want the email to appear in the popup, not replace the current tab.