Closed Bug 1937336 Opened 1 year ago Closed 1 year ago

Pasting image on Google Translate using ctrl+v does not work / has confusing UX

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

Firefox 133
Desktop
All
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: asatoshi94, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

90.04 KB, image/png
Details
Attached image bug.png

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0

Steps to reproduce:

Hi,
I'd like to report issue with copy-pasting images on Google Translate which appeared a long time ago but is still not fixed.

Steps:

  1. Copy any image from any site or just open Paint, select white image (CTRL+A) and copy it (CTRL+C).
  2. Open Google Translate and click "Images" button or just open following link:
    https://translate.google.com/?sl=de&tl=en&op=images
  3. Press CTRL+V to paste that image.

Actual results:

Google will notify that there is error.
"Unable to paste from clipboard right now. Try copying the image again."

When I look on console, while pasting image, POST request is sent but there is always less than 100kb data, even if image is e.g. 8 MB.

Expected results:

Image should be uploaded and site should translate uploaded image (if text to translate will be found). This feature works on chromium-based browsers, but not on Firefox.

Running browser in safe-mode without any addons does not help. I reproduced it on 3 computers.

The Bugbug bot thinks this bug should belong to the 'Firefox::Translations' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Translations
Component: Translations → File Handling
Summary: Pasting image on Google Translate does not working → Pasting image on Google Translate does not works

Hello, thank you for the bug report!
Unfortunately I could not reproduce your issue. I also tried running Firefox in Safe Mode with the same results. Would you be so kind as to answer a few questions so we can investigate this further?

Thank you.

Flags: needinfo?(asatoshi94)

Hello,
It affected any images - png/jpeg or from clipboard copied from Paint or MS Teams. No special configuration - only polish language on all computers, one PC with enhanced protection in FF, two with standard. Running in clear mode without ad-blockers did not help.

However today I noticed (checked) that on 2/3 computers that when I paste an image using shortcut ctrl+v, then context menu appears with only one position - "Paste" and I need to click it, then after a while I receive translation. Perhaps Google changed something because previously that context menu was not available in Firefox. When I click anywhere (not in that button) then I receive same uploading error. That context looks like a workaround for Firefox, especially it is not visible on chromium browsers.

So for now maybe consider it as solved (?).

Flags: needinfo?(asatoshi94)

In Chrome, the first time you hit ctrl+v, you get a permission prompt asking for paste permission. If you grant permission, translate.google.com gets permanent permission to read the clipboard (so you don't get asked for subsequent pastes).

In Firefox, we prompt to allow the individual paste using the context menu that you described in comment #4 . If you click away to dismiss the paste menu, the paste is not allowed and we can reproduce the error message described in comment 0.

If there is a machine where you are very very sure that the paste menu does not even show up, that would be interesting to know... but off-hand, this seems like a UX problem where it's not obvious how to make the paste succeed (and a bit tedious, if you trust the site, to allow each individual paste every time).

Moving to the component where the implementation of the website paste stuff lives.

Blocks: 1619251
Status: UNCONFIRMED → NEW
Component: File Handling → DOM: Copy & Paste and Drag & Drop
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → Core
Hardware: Unspecified → Desktop
Summary: Pasting image on Google Translate does not works → Pasting image on Google Translate using ctrl+v does not work / has confusing UX

I don't know where does open the "paste" only context menu. Edgar, could you take a look?

Flags: needinfo?(echen)

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #6)

I don't know where does open the "paste" only context menu. Edgar, could you take a look?

It's from bug 1744524, code in https://searchfox.org/mozilla-central/rev/7ff7fe028c99154cac1bf7ad9c76eb8613f412d1/toolkit/modules/ClipboardContextMenu.sys.mjs#11 .

See Also: → 1777197

Yes, showing a paste button when a page tries to access clipboard data originating from a different origin is intentional behavior. We have no plans to adopt Chrome’s model, which grants sites permission to access the clipboard without restrictions.

I am going to close this as resolved and move the UX discussion to bug 1777197. If you encounter an issue where the paste menu doesn’t appear, feel free to reopen this bug or file a new one.

Flags: needinfo?(echen)
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: