Closed Bug 1902004 Opened 1 year ago Closed 11 months ago

chatgpt.com - No text copied in input field

Categories

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

Firefox 129
Desktop
Windows 10

Tracking

(Webcompat Priority:P1, Webcompat Score:10, firefox127 wontfix, firefox129 wontfix, firefox136 wontfix, firefox137 wontfix, firefox138 fixed, firefox139 verified)

VERIFIED FIXED
Webcompat Priority P1
Webcompat Score 10
Tracking Status
firefox127 --- wontfix
firefox129 --- wontfix
firefox136 --- wontfix
firefox137 --- wontfix
firefox138 --- fixed
firefox139 --- verified

People

(Reporter: railioaie, Unassigned)

References

()

Details

(Keywords: webcompat:platform-bug, webcompat:site-report, Whiteboard: [webcompat:sightline])

User Story

platform:windows,mac,linux,android
impact:workflow-broken
configuration:general
affects:all

Attachments

(2 files)

Environment:
Operating System: Windows 10
Firefox version: Firefox Nightly 129.0a1 (2024-06-11) / Firefox Release 127.0

Preconditions:
Clean profile

Steps to reproduce:

  1. Navigate on https://chatgpt.com/
  2. Ask something
  3. After ChatGPT responds, hover the mouse over the text you sent and a pencil mark will appear
  4. Click the pencil mark
  5. Select the text and copy
  6. Paste the selected text in the input field
  7. Observe the page

Expected Behavior:
The text should be copied in input field

Actual Behavior:
No text copied in input field

Notes:

  • Reproduces regardless of the status of ETP
  • Reproduces in Firefox Nightly, Firefox Release
  • Does not reproduce in Chrome
Severity: -- → S2
User Story: (updated)
Priority: P3 → P2
Assignee: nobody → kberezina
Status: NEW → ASSIGNED

The problem here is that window.getSelection().toString() returns an empty string, only in Firefox:

  e.preventDefault();
  const n = window.getSelection();
  if (n && n.rangeCount > 0) {
    const a = n.getRangeAt(0).cloneContents();
    t(a);
    const o = document.createElement('div');
    o.appendChild(a);
    const s = o.innerHTML;
    e.clipboardData.setData('text/html', s),
    e.clipboardData.setData('text/plain', n.toString())
  }

This depends on bug85686 (and related bug1527627)

Assignee: kberezina → nobody
Status: ASSIGNED → NEW
See Also: → 1527627

Ksenia Berezina wrote:

The problem here is that window.getSelection().toString() returns an empty string, only in Firefox

I stepped through the current ChatGPT minified JS in the Firefox debugger and verified that this is still the case as of time of this writing.

I also wrote an Unlicense'd userscript workaround that targets chatgpt.com. The userscript is on greasyfork.org. I'm not going to link to it because I don't think the code is relevant to the proposed fix path that runs via bug85686 and I don't want to come off as self-promoting or fishing. However, it's easy enough to find on the site as it is listed publicly.

See Also: → 1921146

problem still present in firefox
132.0.2 (64-bit)

is it this one?
https://greasyfork.org/en/scripts/508994-firefox-chatgpt-fix-copy-while-editing(In reply to mike.clark.8192 from comment #3)

Ksenia Berezina wrote:

The problem here is that window.getSelection().toString() returns an empty string, only in Firefox

I stepped through the current ChatGPT minified JS in the Firefox debugger and verified that this is still the case as of time of this writing.

I also wrote an Unlicense'd userscript workaround that targets chatgpt.com. The userscript is on greasyfork.org. I'm not going to link to it because I don't think the code is relevant to the proposed fix path that runs via bug85686 and I don't want to come off as self-promoting or fishing. However, it's easy enough to find on the site as it is listed publicly.

Whiteboard: [webcompat:sightline]

railioaie, can you still reproduce this? Clicking the pencil shows the text for me now. Thanks!

Flags: needinfo?(railioaie)

Hello, Yes it's still reproducible for me.(see attachments)

Flags: needinfo?(railioaie)

Oh I see, thanks, sorry I misunderstood the bug

Webcompat Priority: --- → P1
Webcompat Score: --- → 10

Still happening. Constant thorn in the side.

I confirmed this issue was resolved after bug 85686 landed.

That's great. That is also blocking a similar webcompat bug in gemini

Right now bug 85686 is nightly-only; I've pinged Sean about how we get it to release

No longer reproduces on Nightly (138), still reproducible on Release (136) and Beta (137).

Putting this back on the diagnosis queue so that the bug on shipping bug 85686 to release can be added as a blocker.

I confirmed that this works in Nightly. Jesup's going to file a bug about letting the behaviour ride the trains.

We already have that bug 1954979 which landed already.
I guess I should just set the bug dependency.

Depends on: 1954979

Shipping to release in 139 -> Fixed

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED

Verified, the issue no longer reproduces.

Tested with:

  • Browser / Version: Firefox 139.0-candidate build 1
  • Operating System: Windows 10
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: