New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 704447 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Long OOO (go/where-is-mgiuca)
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Web Share: Sharing an image via Data URI resulted in user gesture error

Project Member Reported by mgiuca@chromium.org, Mar 23 2017

Issue description

The 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?
 

Comment 1 by mgiuca@chromium.org, Mar 23 2017

Cc: owe...@chromium.org
We don't yet support sharing images. But this is clearly the wrong error in the case that you shared a data URI.
Status: Assigned (was: Untriaged)
Can I share images using navigator.share(); ?

Sign in to add a comment