navigator.share does not work properly on Windows 10 Chrome + Edge browsers

669 Views Asked by At

I use web share API, according to caniuse website it should be supported on Windows OS (browsers Chrome and Edge). But when I try to use navigator.share({ title: 'Title' }); I receive an empty window with the message.

enter image description here

If I use Mac OS Safari it works fine and shows all ways to share the content, for example.

enter image description here

My question is why on Windows I see the empty window and how to fix it.

1

There are 1 best solutions below

1
Max On

The problem was that Windows required url parameter to be sent with title. If you change it to navigator.share({ title: 'Title', url: 'url' }); It will start working on Windows and MacOS.