Page MenuHomePhabricator

CopyTextLayout posts success message but doesn't copy to clipboard in Chrome
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
You'll get the "copied to clipboard" success message, but the content won't actually be in your clipboard

What should have happened instead?:
The content should be in your clipboard

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
Occurs in Chome Version 89.0.4389.128
Works as expected in Firefox 87.0 and Safari 14.0.3

Event Timeline

AnneT renamed this task from CopyTextLayout posts success message but doesn't copy to clipboard to CopyTextLayout posts success message but doesn't copy to clipboard in Chrome.Apr 15 2021, 2:30 AM
AnneT updated the task description. (Show Details)

Change 679975 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/extensions/WikibaseMediaInfo@master] Use textContent instead of value for textarea

https://gerrit.wikimedia.org/r/679975

Change 682589 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/MediaSearch@master] Use textContent instead of value for textarea

https://gerrit.wikimedia.org/r/682589

Change 679975 merged by jenkins-bot:

[mediawiki/extensions/WikibaseMediaInfo@master] Use textContent instead of value for textarea

https://gerrit.wikimedia.org/r/679975

Change 682589 merged by jenkins-bot:

[mediawiki/extensions/MediaSearch@master] Use textContent instead of value for textarea

https://gerrit.wikimedia.org/r/682589

Etonkovidova added a subscriber: Etonkovidova.

Checked in betalabs - works as expected.

Thanks, @AnneT for providing browser versions details. I looked closer into why the bug was missed. The initial testing was done on Chrome 87 (my macOS was not able to update Chrome after that. I checked Saucelabs for cross browser testing but testing the copying to clipboard feature is not quite reliable there. However I tested Chrome 89 in Saucelabs and the fix works for both Chrome 89 and Chrome 90.

The table shows where the Copy works to check it in production:

Browser versionwmf.1 Copy works now?wmf.3 Copy works?
Chrome 90No
Chrome 89No
FF 88Yes
Safari 14Yes

Thanks for the explanation, @Etonkovidova! I'm glad to hear it's working in the latest Chrome versions now—this is a tricky piece of functionality to get right in all browsers

Checked in commons wmf.3 - Chrome 90/89, FF88, Safari 14 and Edge 90 on Safari 14 - all works as expected.