Open Bug 1913112 Opened 1 year ago Updated 16 days ago

docs.google.com - Pasting from markdown option is unavailable

Categories

(Web Compatibility :: Site Reports, defect, P1)

Desktop
All

Tracking

(Webcompat Score:6, Webcompat Priority:P1, firefox129 affected, firefox130 affected, firefox131 affected)

Webcompat Score 6
Webcompat Priority P1
Tracking Status
firefox129 --- affected
firefox130 --- affected
firefox131 --- affected

People

(Reporter: rbucata, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug, )

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan])

User Story

platform:windows,mac,linux
impact:feature-broken
configuration:general
affects:all
branch:release
diagnosis-team:webcompat
outreach-contact-date:2025-05-22
outreach-response-date:2025-05-22
user-impact-score:450

Attachments

(2 files)

Environment:
Operating system: Mac OS X 10.15
Firefox version: Firefox 129.0

Preconditions:
Markdown enabled

Steps to reproduce:

  1. Navigate to: https://docs.google.com/
  2. Perform account login and open any doc
  3. Type "# This is a markdown" inside the doc then copy the newly text inserted
  4. Using any pasting option, select "Paste from markdown" and observe

Expected Behavior:
Text is pasted

Actual Behavior:
Paste from Markdown is not available in Firefox

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in Firefox Nightly, and Firefox Release
  • Does not reproduce in Chrome

Created from https://github.com/webcompat/web-bugs/issues/140397

Attached video 20240814_131717.mp4
OS: macOS → All
Severity: -- → S2
User Story: (updated)
Flags: needinfo?(dschubert)
Priority: -- → P1

There is if (chrome) {} else {openDialog()} which controls this popup.

https://docs.google.com/static/document/client/js/3683200486-client_js_prod_kix_tertiary.js
Line 186518 (pretty printed)

        function () {
          np.CHROME ? (e.Ma.setValue(!0), e.D.va(OFa).xb()) : e.fb.openDialog(NUp, {
          })
        }

Pausing in this function and faking chrome by evaluating Object.defineProperty(np, "CHROME", {value: true}) in the console would still hit another popup (which I think is already covered in webcompat?).

That second popup is shown because of that other check:
https://docs.google.com/static/document/client/js/1621481524-client_js_prod_kix_app.js
Line 20331 (pretty printed)

function iXg(a) {
  if (a.H) a = !1;
   else {
    a: {
      if (!a.F.Ga('docs-erpep')) {
        var c = a.F.Ga('docs-ececs') &&  // Ga methods checks if an attribute exists on `window._docs_flag_initialData`, here window._docs_flag_initialData["docs-ececs"] is false on Firefox and c = false
        mhb(),
        d = Ko(Kia) >= 13;  // Kia == "safari" and d = false
        if (!c && !d) {
          a = !1; /// We return false here and show the popup based on this boolean
          break a
        }
      }
      a = a.D.ld().queryCommandSupported(Pha)
    }
    a = !!(a || np.n0 || np.CHROME && np.bv(52) && Jwc(Nve, !1))
  }
  return a
}
Flags: needinfo?(dschubert)
Whiteboard: [webcompat-source:web-bugs] → [webcompat-source:web-bugs][webcompat:sightline]
Webcompat Priority: --- → P1
Webcompat Score: --- → 8

Did we contact google on this? perhaps we should email google-mozilla-discuss?

Flags: needinfo?(mbalfanz)
Flags: needinfo?(mbalfanz)

I reached out, asking for more info. Stay tuned!

User Story: (updated)

The issue is similar to other in-app menu-triggered copy/paste cases. We'll receive more details on the previous discussion thread over the next week or so.

User Story: (updated)
See Also: → 1806457, 1640222
Depends on: 1956304
Duplicate of this bug: 1982424

docs.google.com doesn't have a mobile web UI

User Story: (updated)

Hmm, I didn’t see any custom types being used when perform "Copy as Markdown", even in Chrome. I only see text/plain and text/html data in clipboard data (both in Firefox and Chrome). And if I do "copy as markdown" in Firefox, and then perform "paste from markdown" in Chrome, it works. So this means the data we put into clipboard is good for markdown feature.

One thing might be the problem is the document.execCommand("paste") which we do not support, but it is marked as deprecated, and there is async clipboard API which provide the same functionality now. We know that some paste function on Google Suite product can not move to use async clipboard API because of the lack of support for web custom format. But in this case, there is no custom format involved. It might be worth to ask google about this.

Webcompat Score: 8 → 6
Whiteboard: [webcompat-source:web-bugs][webcompat:sightline] → [webcompat-source:web-bugs][webcompat:sightline][webcompat:japan]
User Story: (updated)

Paste from markdown only works in Chrome with the Google Docs offline addon installed.

User Story: (updated)
Depends on: 1927810
No longer depends on: 1956304
No longer blocks: google-ua-sniffing
Depends on: 1996130
Depends on: 1956304

Added back the dependency on bug 1956304 because Google wants that before using the async clipboard API

Depends on: 1998195
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: