Skip to content

Google Forms charts copying not persisting (when copied from Chrome) #60811

Description

@mlaetitia

Description

Google Forms has a feature when seeing the results that allows us to copy charts and paste them somewhere else.

When doing this / pasting them to the editor the images don't persist if the copy was made from Chrome . It does work in Firefox.

Step-by-step reproduction instructions

  1. Create a google form with a question with multiple options
  2. Respond to the form a couple of times to generate data
  3. Head to the Responses tab and find a chart with the summary of the responses
  4. Next to the chart there's a "Copy" button - click it on a chrome browser
  5. Open the Editor and paste . You'll see an image appearing (the copied chart)
  6. Save your draft or publish the post
  7. Leave the editor and re-open the editor with the same post - you'll find the image is missing

You can check - if you click the copy button on the Firefox browser - that the issue won't happen. The chart is copied , the chart is saved to the media library and when we re-enter the editor the chart image is still there.

Screenshots, screen recording, code snippet

Screenshot:

Xnip2024-04-17_11-01-12

From Firefox this is created (when checking the Code Editor instead):

<!-- wp:image {"id":10,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://loudly-intelligent.jurassic.ninja/wp-content/uploads/2024/04/image-1024x430.png" alt="" class="wp-image-10"/></figure>
<!-- /wp:image -->

Whereas pasting from Chrome creates a paragraph instead:

<!-- wp:paragraph -->
<p><img src="blob:https://loudly-intelligent.jurassic.ninja/115b3fb7-5377-4c54-8f3f-40de0b1898e4" alt="Forms response chart. Question title: What about the preferred time of day?. Number of responses: 9 responses."></p>
<!-- /wp:paragraph -->

Clipboard inspector showed two different things being copied - added them to gists:

Environment info

  • Tested on the two last versions of WordPress , with PHP 8.1
  • Both Chromium (ARC and Chrome) and Firefox browsers
  • MacOS operating system

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Browser IssuesIssues or PRs that are related to browser specific problems[Feature] Paste[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions