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

Issue 697236 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Sharing a data URI results in user gesture error

Project Member Reported by mgiuca@chromium.org, Feb 28 2017

Issue description

I got this report from a developer via email.

Chrome Version: Unknown
OS: Android (assumed)

What steps will reproduce the problem?

  let url = canvasElement.toDataURL('image/png');

  navigator.share({
    title: document.title,
    text: 'Sample text',
    url: url
  }).then(() => console.log('Successful share'))
  .catch(error => console.log('Error sharing:', error));

(Note: the developer told me "I was clicking on a button in the same way as with the sharing of a regular URL", so apparently the call to navigator.share is in a click handler.)

What is the expected result?
Not clear (since it's a data URI). Either the URI is delivered to the target application as a URI, or it's converted to a file object, or some other meaningful error.

What happens instead?
"Error sharing: DOMException: Must be handling a user gesture to perform a share request."

If indeed this is on a button click handler, the error message doesn't make sense.
 

Sign in to add a comment