"Paste special" is not working properly within Google doc's spreadsheet
Categories
(Core :: DOM: Selection, defect, P3)
Tracking
()
People
(Reporter: clara.guerrero, Assigned: twisniewski)
References
(Depends on 1 open bug, Blocks 2 open bugs, )
Details
(Keywords: leave-open, webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat:sightline])
User Story
platform:windows,mac,linux,android impact:feature-broken configuration:general affects:all branch:release user-impact-score:900 outreach-assignee:denschub outreach-contact-date:2025-03-17 outreach-reference:mozilla-gsuite-discuss
Attachments
(7 files)
Affected versions]
Release 76.0 (64-bit)
Beta 77.0b8 (64-bit)
Firefox Nightly 78.0a1 (2020-05-21) (64-bit)
[Affected platforms]
( macOS 10.14 (Mojave))
[Steps to reproduce]
1- Launch the Firefox Browser and visit https://en.wikipedia.org/wiki/Game_of_Thrones or https://www.w3schools.com/html/html_tables.asp
2- Open https://docs.google.com/spreadsheets
3- Select any desired amount of rows from the table in step 1 and copy with cmd c
4- Paste it in the online editor from step 2 with cmd v
5- Table is pasted successfully
6- Now click on menu edit/paste special/all except borders
[Expected result]
Table should be pasted accordingly
[Actual result]
Selection pasted is not correct.
If repeating steps in chrome, the table is correctly pasted, as shown in the attachment.
Reporter | ||
Comment 1•5 years ago
|
||
Reporter | ||
Updated•5 years ago
|
Works on Chrome.
Reporter | ||
Comment 3•5 years ago
|
||
Notice that in Beta 78.0b4 (64-bit) for macOS 10.5 no option from paste special is working, not just the "all except borders" option.
Updated•5 years ago
|
It seems Google spreadsheets uses its own clipboard for "paste special". Note that clicking the "paste" button from the menu will ask the user to paste via pressing Cmd/Ctrl+v.
I guess "paste special" has to use the async Clipboard API, which Firefox doesn't support fully yet.
Copying from inside Google spreadsheets and pasting via "paste special" to Google spreadsheets works.
Happens on Ubuntu too.
Comment 5•4 years ago
|
||
(In reply to Mirko Brodesser (:mbrodesser) from comment #4)
It seems Google spreadsheets uses its own clipboard for "paste special". Note that clicking the "paste" button from the menu will ask the user to paste via pressing Cmd/Ctrl+v.
I guess "paste special" has to use the async Clipboard API, which Firefox doesn't support fully yet.
Adding bug dependency for this.
Copying from inside Google spreadsheets and pasting via "paste special" to Google spreadsheets works.
Happens on Ubuntu too.
Comment 6•3 years ago
|
||
Setting this as WebCompat Priority P2 for now. This is somewhat annoying and Google Sheets is important, but it's probably not a P1 for us, since Google Sheets is usable and there is a workaround available.
Dennis: FYI, implementing and exposing the async clipboard API, which should fix or allow Google fixing this issue, is WIP (bug 1744524 and related ones).
Comment 9•3 years ago
|
||
(In reply to Mirko Brodesser (:mbrodesser) from comment #4)
Copying from inside Google spreadsheets and pasting via "paste special" to Google spreadsheets works.
Please note that this doesn't work even if copying from google spreadsheets to other google spreadsheets. For some reason this has not been fixed by bug 1744524.
For more details, please check the latest attachment.
Updated•3 years ago
|
(In reply to Cristian Baica [:cbaica], Release Desktop QA from comment #9)
Created attachment 9283634 [details]
paste special in google docs(In reply to Mirko Brodesser (:mbrodesser) from comment #4)
Copying from inside Google spreadsheets and pasting via "paste special" to Google spreadsheets works.
Please note that this doesn't work even if copying from google spreadsheets to other google spreadsheets. For some reason this has not been fixed by bug 1744524.
For more details, please check the latest attachment.
Fixing bug 1744524 is prerequisite for fixing this bug. However, it's not sufficient. First, bug 1770358 will have to be fixed and afterwards Google Spreadsheets might need adaptation too.
Updated•3 years ago
|
Comment 11•2 years ago
|
||
I could no longer reproduce this on Win11, Nightly121.
Comment 13•2 years ago
|
||
(In reply to Hsin-Yi Tsai (she/her) [:hsinyi] from comment #11)
I could no longer reproduce this on Win11, Nightly121.
Oops, corrected - the issue is still reproducible for me.
Comment 14•2 years ago
|
||
Dear webcompat team,
clipbaord.read & readText() have been enabled in nightly and early beta. However, this issue is still there. Can you help us investigate this a bit further and potentially will have to reach out to gsuite team to change their code accordingly?
Updated•2 years ago
|
Comment 15•2 years ago
|
||
I've tried to use "Paste special" > "All except borders" (and other items from this submenu) in Chrome and it doesn't work unless I install the Google Docs offline extension.
Hi Hsin-Yi Tsai, wonder if you could confirm whether this is the case for you as well?
(I had the extension already installed in Chrome, so the feature worked. After uninstalling it, "Paste special" didn't work, but started working once I installed it again. So I'm trying to figure out if the extension is required and which APIs it's relying on).
Comment 16•2 years ago
|
||
Hello Ksenia, good catch! I didn't realize that I have the extension installed. Similar here, "Paste special" didn't work on Chromium-based browsers if I uninstalled the extension.
Comment 17•2 years ago
|
||
The extension is marked as "Installed by default" in Chrome, but I don't know what the situation is with other Chromium-based browsers.
Comment 18•2 years ago
|
||
(In reply to James Graham [:jgraham] from comment #17)
The extension is marked as "Installed by default" in Chrome, but I don't know what the situation is with other Chromium-based browsers.
I was using Chrome and Edge to reproduce. Same for Edge.
Comment 19•2 years ago
|
||
(In reply to Hsin-Yi Tsai (she/her) [:hsinyi] from comment #18)
(In reply to James Graham [:jgraham] from comment #17)
The extension is marked as "Installed by default" in Chrome, but I don't know what the situation is with other Chromium-based browsers.
I was using Chrome and Edge to reproduce. Same for Edge.
That's good to know. I did some investigation last year for bug1524772 that requires the same extension. I'll install it in Firefox and see whether pasting would work right away or try to figure out what's missing.
Comment 20•2 years ago
•
|
||
GDocs is using document.execCommand('paste')
when using "Paste" and "Paste special" from the top/context menu.
I've created a codepen testcase that illustrates the behaviour (pasting with execCommand
doesn't work in Firefox and works in Chrome only if I install the modified google docs offline extension - more on that below)
The extension code is mostly not being used at all for this functionality, however it looks like content_capabilities
+ permissions
from manifest.json is what makes document.execCommand('paste')
work in Chrome:
"content_capabilities": {
"matches": [
"https://docs.google.com/*",
"https://drive.google.com/*",
"https://drive-autopush.corp.google.com/*",
"https://drive-daily-0.corp.google.com/*",
"https://drive-daily-1.corp.google.com/*",
"https://drive-daily-2.corp.google.com/*",
"https://drive-daily-3.corp.google.com/*",
"https://drive-daily-4.corp.google.com/*",
"https://drive-daily-5.corp.google.com/*",
"https://drive-daily-6.corp.google.com/*",
"https://drive-preprod.corp.google.com/*",
"https://drive-staging.corp.google.com/*",
],
"permissions": [ "clipboardRead", "clipboardWrite", "unlimitedStorage" ]
},
I've attached a simple manifest.json containing content_capabilities
. It makes the pasting testcase work in Chrome, (with added "https://codepen.io/" and "https://cdpn.io/" to the list of matches). It only works in non-stable channels, i.e. Chrome Canary as this property is whitelisted only to 6 verified extensions in stable channels.
Comment 21•2 years ago
|
||
I believe document.execCommand('paste')
is disabled for webcontent for security reasons, but using an extension with content_capabilities
and clipboardRead
permissions is basically enabling it in Chrome, though only for "trusted" (likely internal Google) extensions.
Not sure what can be done on our side given that Google Docs are not using Clipboard API, but rather implementing a workaround.
I've noticed Safari is showing a native "Paste" context menu when document.execCommand('paste');
is executed, perhaps we could do something similar?
Comment 22•1 year ago
|
||
Well the behavior is quite odd now, at least in my experience. With the STR the outcome is the same on Chrome whether I paste normally or special, on Firefox the paste special does not work at all.
Tested on:
• Browser / Version: Firefox Nightly 128.0a1 (2024-05-30) / Firefox Release 126 / Chrome 125.0.6422.113 / Safari 17.3.1 (19617.2.4.11.12)
• Operating System: Mac OS Sonoma 14.1.3
Assignee | ||
Comment 23•6 months ago
|
||
Updated•6 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Comment 24•5 months ago
|
||
The severity field for this bug is set to S3. However, this bug has a P1 WebCompat priority.
:twisniewski, could you consider increasing the severity of this web compatibility bug?
For more information, please visit BugBot documentation.
Assignee | ||
Updated•5 months ago
|
Comment 25•4 months ago
|
||
The issue is still reproducible
Tested with:
Browser / Version: Firefox Nightly 138.0a1 (2025-03-27)
Operating System: Mac Sonoma 14.7.4
Updated•4 months ago
|
Updated•4 months ago
|
Updated•3 months ago
|
Comment 26•1 month ago
|
||
Please note that the issue is NOT reproducible in Edge, which must not have Google's add-ons preinstalled.
Comment 27•1 month ago
|
||
(and yeah, it is still reproducable in Firefox)
Updated•27 days ago
|
Updated•23 days ago
|
Description
•