nygardk / react-share

Social media share buttons and share counts for React
MIT License
2.6k stars 433 forks source link

Firefox iOS blocking window.open facebook and twitter with default configuration #236

Open buesing opened 5 years ago

buesing commented 5 years ago

I'm running Firefox 17.0 on an iPhone 7 with iOS 12.2. At least the facebook and twitter share buttons are not working for me (tested on the demo page at http://nygardk.github.io/react-share/). This seems to be related to the feature "protect from tracking", which is on by default (not sure if this is the exact feature name, my browser language is german). When I turn that feature off, everything works.

Looking into this, I have reduced the test case to running window.open("http://www.facebook.com"), which is not doing anything in firefox iOS, no errors, just nothing happens. Same for window.open("http://www.twitter.com/");, it does work with other domains though. Interestingly it works with http://www.faebook.com and http://twiter.com/ (notice the typos in the domains, these seem to have been bought to avoid phishing etc, and forward to the correct domain). Maybe this would be a reasonable workaround for FF iOS?

vishnukvmd commented 2 years ago

In addition to TwitterShareButton, LinkedinShareButton and RedditShareButton are also not working on Firefox on iOS.

@nygardk Would it make sense to use an anchor tag instead of window.open?

coderdix24 commented 1 year ago

add EmailShareButton to the list