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

Issue 675050 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Cannot paste copied screenshots to Hangouts on ChromeOS

Reported by dli...@salesforce.com, Dec 16 2016

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 8872.70.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Platform: 8872.70.0 (Official Build) stable-channel chell

Steps to reproduce the problem:
1. Take a full or selected-area screenshot
2. Click Copy to Clipboard (bottom-right)
3. Switch to Hangouts extension, Hangouts in Gmail.com, or Hangouts.google.com, press Ctrl+V or right-click > paste.

What is the expected behavior?
Copied screenshot image should paste into Hangouts.
Images copied from elsewhere paste into Hangouts fine.
Screenshots copied to clipboard paste into other apps (e.g. Docs) fine.

What went wrong?
Nothing happens.

WebStore page: https://chrome.google.com/webstore/detail/google-hangouts/nckgahadagoaajjgafhacjanaoiihapd

Did this work before? No 

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 8872.70.0
Flash Version: Shockwave Flash 23.0 r0
 
Cc: dskaram@chromium.org
Confirmed the same issue happens on my device. You can reproduce by doing the following in either the built in hangouts in gmail or the hangouts extension.

1) Take a screenshot within ChromeOS and select option to "Copy to clipboard" once the popup with screenshot pops up in lower right corner
2) Try to paste screenshot into hangouts chat window and nothing happens. The expectation is that it should copy the image into the chat window.

Note if I try to paste into a gmail draft it works fine. It also works fine if I copy an image anywhere in ChromeOS (e.g. copy image from webpage) and then try to paste into a hangouts window. Only screenshots seem to be an issue.


Labels: -Type-Bug Type-Feature
Status: Untriaged (was: Unconfirmed)

Comment 3 by kotah@chromium.org, May 2 2017

Cc: kotah@chromium.org
Labels: Hotlist-Enterprise
It seems that pasting of screenshots fails and cannot be pasted anywhere when screenshots are saved by default to Google Drive in ChromeOS. If changing the default location of screenshots to Downloads, the issue is not present. Sadly, using local machine storage defeats the purpose of having everything saved to the Google Drive and never losing anything.

Confirmed not working on Asus Chromebook Flip C302CA and Lenovo Thinkpad Chromebook 13. I believe this is an issue on all Chromebooks.
Cc: jen...@chromium.org satorux@chromium.org
Components: Platform>Apps>FileManager UI>Shell
Labels: -Type-Feature Type-Bug

Comment 6 by osh...@chromium.org, Nov 17 2017

Components: -UI>Shell Blink>Storage
Owner: yamaguchi@chromium.org
Status: Assigned (was: Untriaged)
Cc: tetsui@chromium.org hirono@chromium.org yoshiki@chromium.org
+yoshiki@, +tetsui@, does "copy to clipboard" on the notification work differently if the screenshot is saved to Drive?

BTW, I'm guessing that screenshots are saved in a folder that's set for "Downloads" location in settings. Is it correct?

Comment 8 by tetsui@chromium.org, Nov 21 2017

> BTW, I'm guessing that screenshots are saved in a folder that's set for "Downloads" location in settings. Is it correct?

This is correct, but download folder location can be changed to a Drive directory from Settings > Downloads > Location.

When "copy to clipboard" button is pressed, every time the image is loaded again from the saved location (To avoid keeping the screenshot image in memory, according to the code comment). So the code path is different if the Downloads folder is on Drive.

Comment 9 by tetsui@chromium.org, Nov 21 2017

I tried all combinations of:
1. Hangout
2. Google Docs

A. Download folder on Google Drive
B. Default local Download folder

For Hangout, both A and B failed. For Google Docs, both A and B are successful.
Re #9, That's interesting! Could anyone take a closer look?
Cc: yamaguchi@chromium.org
Owner: tetsui@chromium.org
Status: Started (was: Assigned)
I would take a further look.
Project Member

Comment 13 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6e33d4ee1539449f56053ce8523c338d247bff2

commit a6e33d4ee1539449f56053ce8523c338d247bff2
Author: Tetsui Ohkubo <tetsui@chromium.org>
Date: Wed Nov 22 03:08:46 2017

Use WriteImage for "Copy to clipboard" button.

Previously, "Copy to clipboard" button in screenshot notification was
not working properly with some websites e.g. Google Hangouts, while
it works as intended on some websites e.g. Google Docs.

The reason was because ChromeScreenshotGrabber was using
ScopedClipboardWriter::WriteHTML instead of WriteImage, by converting
the image to an HTML with img tag.

As a result, in a website that supports pasting HTML, it worked,
but in a website that only supports pasting of texts and images,
it didn't work.

TEST=ChromeScreenshotGrabberBrowserTest.TakeScreenshot
BUG= 675050 

Change-Id: Ic96121cc1fe28927c174c28c4f40e3d3e470ea42
Reviewed-on: https://chromium-review.googlesource.com/781342
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518515}
[modify] https://crrev.com/a6e33d4ee1539449f56053ce8523c338d247bff2/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
[modify] https://crrev.com/a6e33d4ee1539449f56053ce8523c338d247bff2/chrome/browser/ui/ash/chrome_screenshot_grabber_browsertest.cc

Status: Fixed (was: Started)
wow, that was fast. thank you for fixing this quickly.

Comment 16 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 17 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment