Closed Bug 1636988 Opened 2 years ago Closed 9 months ago

paste of url from Google Sheets/'Get link to this cell' fails in Slack

Categories

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

Firefox 85
defect

Tracking

()

RESOLVED FIXED
Webcompat Priority P1

People

(Reporter: aryx, Assigned: mbrodesser)

References

Details

Pasting of urls from Google docs/sheets 'Get link to this cell' fails in Slack.

  1. Open a google sheet.
  2. RIght-click a cell with.
  3. Select 'Get link to this cell'.
  4. Try to paste it into a Slack channel.

Actual result: Version:0.9 StartHTML:00000097 EndHTML:00000167 StartFragment:00000131 EndFragment:00000131
Expected result: Something like https://docs.google.com/spreadsheets/d/<string>/edit?skip_itp2_check=true#gid=1756929076&range=D25

Fails with Firefox Nightly 78.0a1 and 76.0.1, works in latest Chrome.

Hi aryx, this doesn't reproduce for me in Nightly on mac. Does it still for you?

Flags: needinfo?(aryx.bugmail)

It still reproduces with Firefox 78.0a1 20200526023857 on Windows here.

Flags: needinfo?(aryx.bugmail)

Thanks, will test Windows.

Hm, this is maybe a super old regression?

It's weird though, this is Windows platform code for setting to the clipboard, AFAICT: https://searchfox.org/mozilla-central/source/widget/windows/nsDataObj.cpp#1953-1958

Mozregression only got me this far: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bd4cebdbed4bcd34d449f67d51f139f9bdf75edc&tochange=8991d660f20e3eea652e060c30e17670b45a9257

Bug 1493292 could be related? Tom, could your change (from 2018!) be related to the reported issue?

Severity: -- → S3
Flags: needinfo?(evilpies)
Priority: -- → P3

Could be. I don't know. This code is super complicated and barely tested or testable. I don't currently develop on Windows so I can't help with this at the moment.

Flags: needinfo?(evilpies)

OK, thanks for checking. Probably it would be most useful for us to come up with a reduced test case here (welp).

Flags: needinfo?(miket)

This appears to be fixed now, which could mean we fixed something, Slack fixed something, or GDocs fixed something (least likely).

Sebastian, can you verify? On Windows Nightly 81, I was able to create the following link and paste it into slack:

https://docs.google.com/spreadsheets/d/1sCMKcFyqQr4FaDRJNVFp2k9B-WXmd1r7FP_MP9HnvfQ/edit#gid=0&range=A3

Flags: needinfo?(miket) → needinfo?(aryx.bugmail)

Hi Mike, the behavior is unchanged with Windows Nightly 81 (20200807093158) here, even if I open your doc, copy the link and then Try to paste it in Slack.

Flags: needinfo?(aryx.bugmail)

Oh interesting (but also, confusing). Thanks for checking.

Comment 0 happens to me when pasting into Google Docs, too. If I paste into the URL bar it shows properly and then I can copy/paste that into the thing I want.

Jens, can you add investigation of the clipboard behaviour here to the DOM team's backlog? Thanks.

Flags: needinfo?(jstutte)

Mirko, can you link this to an appropriate meta bug? Thank you!

Flags: needinfo?(jstutte) → needinfo?(mbrodesser)

Interesting. It works with Chrome. Chrome adds only the

"text/plain" flavor to the clipboard:
https://docs.google.com/spreadsheets/d/1qGuCD9VInnUpH4juGPyHwu9UmLOcZNNpAglpCp4yAuE/edit#gid=0&range=A1

Whereas Firefox adds
"text/html" flavor:
<meta http-equiv="content-type" content="text/html; charset=utf-8">

and
"text/plain" flavor:
https://docs.google.com/spreadsheets/d/1qGuCD9VInnUpH4juGPyHwu9UmLOcZNNpAglpCp4yAuE/edit#gid=0&range=A1

The fix in this case is presumably to not export the "text/html" flavor at all. I'm not aware of any meta-bug for clipboard-bugs in general. This could also be a bug of Google Docs Spreadsheets. It needs further analysis. Removing priority and severity so that it reappears on our radar.

Severity: S3 → --
Component: Desktop → DOM: Serializers
Flags: needinfo?(mbrodesser)
Priority: P3 → --
Product: Web Compatibility → Core
Version: unspecified → Firefox 85

Karl-san, could you investigate the implementation before reporting Google?

Flags: needinfo?(kdubost)

Hmmm I can't reproduce on macOS as said at the beginning of the issue.
Oana, What does it give on windows in the latest nightly?

<div class="goog-menuitem apps-menuitem" role="menuitem" style="user-select: none;" id="ek6kyw:2tq">
<div class="goog-menuitem-content"><span class="goog-menuitem-label">Get link to this cell</span></div></div>

But given the way the code is minified is usually quite quick to ask Google directly.

Flags: needinfo?(kdubost)
Flags: needinfo?(oana.arbuzov)

Karl I can reproduce it on Windows, nothing is pasted on Slack.

Tested with:
Browser / Version: Firefox Nightly 85.0a1 (2020-12-06)
Operating System: Windows 10 Pro

Flags: needinfo?(oana.arbuzov)

Comment 12 suggests this is rather exceptionally bad.

Severity: -- → S2
Priority: -- → P2
Webcompat Priority: --- → P1
See Also: → 1722711
Component: DOM: Serializers → DOM: Copy & Paste and Drag & Drop

Karl, do you know if a bug was filed with Google, so I can check on status? Thanks.
(I no longer have access to the mailing list archives to double check).

Flags: needinfo?(kdubost)

(In reply to Mike Taylor [:miketaylr] from comment #17)

Karl, do you know if a bug was filed with Google, so I can check on status? Thanks.
(I no longer have access to the mailing list archives to double check).

No bug was filed for this. I'm investigating this issue as part of bug 1722711, for which I'm currently trying to determine if it's a duplicate of this one. Will contact Google when the latter has been resolved.

Summary: paste of url from Google docs/sheets 'Get link to this cell' fails in Slack → paste of url from Sheets/'Get link to this cell' fails in Slack
Summary: paste of url from Sheets/'Get link to this cell' fails in Slack → paste of url from Google Sheets/'Get link to this cell' fails in Slack

Contacted Google-developers about this. It's likely a bug in Google Sheets. Will update this ticket accordingly.

Assignee: nobody → mbrodesser
Flags: needinfo?(kdubost)

It's still broken. Contacted Google-developers again.

Google-developers claim to have fixed this. Works on Ubuntu 20.04.

I can no longer reproduce the issue on my side either. The link cell link is pasted on Slack.
https://prnt.sc/1u841xv

Tested with:
Browser / Version: Firefox Nightly 94.0a1 (2021-09-29)
Operating System: Windows 10 Pro

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.