Web Share: Sharing an image via Data URI resulted in user gesture error |
||
Issue descriptionThe following feedback was sent to us via owencm@ (who posted it to the WICG bug tracker: https://github.com/WICG/web-share/issues/16): I'm actually working on a collaborative whiteboard application. I wanted to share the drawings on the canvas as an image. I generated the image and tried to share it using such a code: let url = canvasElement.toDataURL('image/png'); navigator.share({ title: document.title, text: "Shared whiteboard", url: url }).then(() => console.log('Successful share')) .catch(error => console.log('Error sharing:', error)); However, I got an exception: "Error sharing: DOMException: Must be handling a user gesture to perform a share request." I would say this was quite unexpected, because I was clicking on a button in the same way as with the sharing of a regular URL. I'm not sure why this user gesture was not accepted. Moreover, is sharing of images in such a way supported?
,
Aug 1
,
Aug 7
Can I share images using navigator.share(); ? |
||
►
Sign in to add a comment |
||
Comment 1 by mgiuca@chromium.org
, Mar 23 2017