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

EmailShareButton not working in v5.2.0 any more

Open sebastian-ludwig opened this issue 1 year ago • 4 comments

Using <EmailShareButton url="http://myurl.com" subject="Subject" body="Body"> has stopped opening up the email-window in version v5.2.0 when clicking.

I am not sure if it is related to this bug #563, but the other share-buttons are working.

sebastian-ludwig avatar Feb 15 '25 05:02 sebastian-ludwig

We are seeing this as well - I think it has to do with the change from:

onClick: (_, link: string) => {
  window.location.href = link;
},

to

onClick: (event: React.MouseEvent<HTMLButtonElement>) => {
  const link = event.currentTarget.getAttribute('data-link');
  if (link) {
    window.location.href = link;
  }
},

and there isn't really a data-link attribute for the email share - at least according to my debugging

Borvik avatar Feb 18 '25 21:02 Borvik

Ah, that change slipped in accidentally and indeed broke EmailShareButton! It's now fixed in v5.2.1.

nygardk avatar Feb 19 '25 04:02 nygardk

Its not working even in v5.2.1

mtahirrc avatar Feb 25 '25 10:02 mtahirrc

@nygardk

mtahirrc avatar Feb 25 '25 10:02 mtahirrc