github-contributions-chart icon indicating copy to clipboard operation
github-contributions-chart copied to clipboard

Share button does not do anything on desktop

Open sloorush opened this issue 3 years ago • 2 comments

I used the website on brave browser, and the share button does not do anything, download the image buttons work perfectly.

I guess this is like a share popup in mobile browsers.

Possible solutions:

  • Make a custom share popup
  • Check for prebuilt share popups (like the mobile ones but for desktop) (browser native or otherwise)
  • Meanwhile, remove the button if the device is not supported

Please do comment if this is something that is only happening on my PC.

Thanks, pretty cool project!

sloorush avatar Jan 02 '23 08:01 sloorush

The Share button is displayed only if navigator.share is available but I think Brave can't display the share sheet for images. There is a navigator.canShare(...) API that I should be using instead to check the availability. Will do that.

sallar avatar Jan 02 '23 09:01 sallar

Sounds like a solution, thanks!

sloorush avatar Jan 02 '23 09:01 sloorush