Closed Bug 1711346 Opened 4 years ago Closed 3 years ago

Taking screenshot of web page and putting it directly into clipboard should not create image file with screenshot

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(firefox90 verified)

VERIFIED FIXED
90 Branch
Tracking Status
firefox90 --- verified

People

(Reporter: aryx, Assigned: siddhantgupta3)

References

(Blocks 2 open bugs)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

Firefox 90.0a1

What were you doing?

  1. Open the developer tools.
  2. Open their settings.
  3. Enable 'Screenshot to clipboard'.
  4. Load a web page.
  5. Use the screenshot button in the developer tools toolbar.

What happened?

'Download' notification for screenshot file

What should have happened?

No screenshot file created.

Looks like we always pass file: true when using the screenshot tool, even if the clipboard option is enabled:

      const args = { fullpage: true, file: true };
      if (clipboardEnabled) {
        args.clipboard = true;
      }

https://searchfox.org/mozilla-central/rev/5359952d8b0be3e706e8c943c2bef2674723b8a9/devtools/client/definitions.js#566-569

From the discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1257913 where the feature was added, it seems that it was the intention to have the screenshot saved both to file & clipboard when enabling the clipboard feature.

We might revisit, or at least rewrite the option so that it's clear that it's only saving to clipboard on top of saving to a file (eg "Screenshot to clipboard" -> "Also copy screenshot to clipboard" or something)

Component: Inspector → General

Thanks for reporting this Sebastian!

We've discussed this at our team meeting and here are some comments for anyone interested in fixing this bug:

  1. It makes sense to copy to clipboard only and we might want to change the option label to: "Screenshot to clipboard only" (the string key should also be changed, when changing the string)
  2. There could be a small notification that the screenshot goes to the clipboard only (screen flash, etc.), but this can be done in a follow up bug (there might be a discussion about how exactly the UI should look like)

Honza

Blocks: 1483143
Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P3
Summary: taking screenshot of web page and putting it directly into clipboard should not create image file with screenshot → Taking screenshot of web page and putting it directly into clipboard should not create image file with screenshot

Hi, first-time contributor here!
Can I work on this issue?

Assigned to you, thank you for helping with this one

Assignee: nobody → siddhantgupta3
Status: NEW → ASSIGNED
Attachment #9222684 - Attachment description: Bug 1711346 - [devtools] Disabled saving to file when screenshot to clipboard is enabled. r=jdescottes → Bug 1711346 - [devtools] Disabled saving to file when screenshot to clipboard is enabled. Removed tooltip key changes r=jdescottes
Attachment #9222684 - Attachment description: Bug 1711346 - [devtools] Disabled saving to file when screenshot to clipboard is enabled. Removed tooltip key changes r=jdescottes → Bug 1711346 - [devtools] Disabled saving to file when screenshot to clipboard is enabled. Updated inspector and developer tools toolbar r=jdescottes

ni: push the patch to try before landing.

Flags: needinfo?(jdescottes)
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ebce45b229c [devtools] Disabled saving to file when screenshot to clipboard is enabled. Updated inspector and developer tools toolbar r=jdescottes,fluent-reviewers,flod
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
QA Whiteboard: [qa-90b-p2]

Reproduced the issue with 90.0a1 (20210514215821) on Windows 10x64.
Verified fixed with 90.0b5 (20210608185546) on Windows 10x64, macOS 11.3 and Ubuntu 18.04.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-90b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: