Closed Bug 1771823 Opened 3 years ago Closed 3 years ago

Firefox clears the system clipboard when the application exits

Categories

(Core :: Widget: Cocoa, defect, P2)

Unspecified
macOS
defect

Tracking

()

VERIFIED FIXED
103 Branch
Tracking Status
relnote-firefox --- 101+
firefox-esr91 --- unaffected
firefox-esr102 --- verified
firefox101 + verified
firefox102 + verified
firefox103 --- verified

People

(Reporter: cpeterson, Assigned: m_kato)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

This bug is a regression in Firefox 101 from bug 666254.

Makoto, your fix for bug 666254 causes Firefox on macOS to clear the system clipboard when you exit Firefox. Is clearing the system clipboard intentional? Firefox on Windows doesn't do this when it exits and neither Chrome nor Safari on macOS do they exit.

Steps to reproduce

  1. Open a page in Firefox version >= 101 on macOS.
  2. Copy some text from the page. Paste the copied text into another application to verify that the text was successfully copied.
  3. Quit Firefox.
  4. Try to paste the copied text into the other application again.

Expected result

You should be able to paste the copied text into the other application again.

Actual result

You can't paste the copied text into the other application again because Firefox cleared the system clipboard when it exits. Firefox on Windows doesn't do this when it exits, only Firefox on macOS.

Flags: needinfo?(m_kato)
Assignee: nobody → m_kato
Flags: needinfo?(m_kato)
Has Regression Range: --- → yes
Severity: -- → S2
Status: NEW → ASSIGNED
Priority: -- → P2

This is regression by bug 666254. We shouldn't call
nsClipborad::EmptyClipboard() in destructor. Cached nsITransferable will
be cleared by nsBaseClipboard()'s destructor.

Seems like something we'd probably want to consider taking in a dot release.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/fcab49b12871 Don't clear system clipboard when exiting Firefox. r=mac-reviewers,spohl
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

[Tracking Requested - why for this release]:

Setting status-firefox101=fix-optional. I don't think this regression is serious enough to drive a 101.x dot release, but it might be a good candidate for a ride-along. I do think we should uplift this fix to Beta 102 and ESR 102.

Please request the uplift to beta, thanks.

Comment on attachment 9279051 [details]
Bug 1771823 - Don't clear system clipboard when exiting Firefox. r=#mac-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: When exiting Firefox, system's clipboard becomes empty
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open any web site
  1. Copy any word using [Command] + [C]
  2. Quit Firefox
  3. Paste text to any application
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Remove unnecessary cleanup of clipboard.
  • String changes made/needed: N/A
  • Is Android affected?: No
Attachment #9279051 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Reproducible on Firefox 102.0b1(20220530132252) on macOS 11. Verified as fixed on Nightly 103.0a1(20220605213032) on macOS 11.

Comment on attachment 9279051 [details]
Bug 1771823 - Don't clear system clipboard when exiting Firefox. r=#mac-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined: When exiting Firefox, system's clipboard becomes empty
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open any web site
  1. Copy any word using [Command] + [C]
  2. Quit Firefox
  3. Paste text to any application
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Remove unnecessary cleanup of clipboard.
  • String changes made/needed: N/A
  • Is Android affected?: No
Attachment #9279051 - Flags: approval-mozilla-release?

Comment on attachment 9279051 [details]
Bug 1771823 - Don't clear system clipboard when exiting Firefox. r=#mac-reviewers

Approved for 102 beta 5, thanks.

Attachment #9279051 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hello,
I confirm the fix is verified on Firefox 102.0b5(20220607212916) on macOS 11.

Comment on attachment 9279051 [details]
Bug 1771823 - Don't clear system clipboard when exiting Firefox. r=#mac-reviewers

Approved for 101.0.1.

Attachment #9279051 - Flags: approval-mozilla-release? → approval-mozilla-release+

Added to the 101.0.1 relnotes:

Fixed Firefox clearing the clipboard when closing on macOS

Hello,
I confirm this fix is verified on Firefox 101.0.1(20220608170832) on macOS 11.

Hello, I confirm this fix is verified on Firefox 102esr(20220623064521) on macOS 11.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

Hello,
I encountered this error in Firefox 103.0b7 on Ubuntu 22.04. This is not reproducible is Firefox 103.0b6, nor the latest nightly. Should I file a new bug for Ubuntu?

Flags: needinfo?(m_kato)

(In reply to Ardelean Oana from comment #19)

Hello,
I encountered this error in Firefox 103.0b7 on Ubuntu 22.04. This is not reproducible is Firefox 103.0b6, nor the latest nightly. Should I file a new bug for Ubuntu?

Yes, please file new issue.

Flags: needinfo?(m_kato)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: