Open Bug 1674663 Opened 4 years ago Updated 8 months ago

Problem in take screenshot when selecting a custom region

Categories

(Firefox :: Screenshots, defect, P2)

Firefox 110
Desktop
Windows 11
defect

Tracking

()

UNCONFIRMED

People

(Reporter: saadi.shamsaee, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

When I use "Take a Screenshot" if I select a region by clicking, I can save the screenshot.
But if I change the region,
or
If from the beginning, I drag the mouse on the page to select a custom area,

Actual results:

immediately this message is displayed in the lower right corner of the browser:

'''Shot Copied'''
Your shot has been copied to the clipboard.
Press CTRL-V to paste.

But even the shotted image does not paste in photo programs.

Expected results:

I tried Safe Mode and disable hardware acceleration, but the problem was not solved.

This problem exists even in new and clean profiles.

My Firefox theme is on default. And the userChrome.css file does not exist in the profile files folder.

I disabled Anti-virus, but the problem was not solved.

This problem has existed for months. During this time, once I completely reinstalled Windows.

Component: Untriaged → Screenshots
OS: Unspecified → Windows 10
Hardware: Unspecified → Desktop

to correct the sentence:
If from the beginning, I drag the mouse on the page to select a custom "region",

The severity field is not set for this bug.
:emalysz, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emalysz)
Severity: -- → S3
Flags: needinfo?(emalysz)
Priority: -- → P2

From Xubuntu 20.04, FF 85.0
Function used from Developer Tools by clicking "Make Screenshot of a Region" (sorry for possible bad translation). In Devel. tools > Settings I set screenshot to be copied to clipboard. When icon is clicked, camera sound is played, flash flashed, but no image in the clipboard.

Using console command :screenshot --clipboard works fine.

I'm currently using Firefox 85 Stable and there is not problem in taking screenshots anymore for me.

From comment 4 it sounds like this problem was fixed. I'm not actually clear if this was a devtools or Screenshots problem, so please re-open if this is reproducible using the Screenshots feature (browser toolbar button or context menu item)

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME

Each time with a new installation of Windows, the problem is fixed, but after a while, the problem returns again. And only with screenshot extensions can I take screenshots of pages.

Problem still not fixed. With Firefox's internal 'Take a screenshot' just "Save full page" and "Save visible" works, and if i select select a custom area Firefox shows this message and doesn't save and doesn't copy anything :

Shot Copied
Your shot has been copied to the clipboard.
Press CTRL-V to paste.

Still i can't take screenshot with Firefox 's inside screenshot tool ("Take a Screenshot"). i can take screenshot just by related extensions or by Firefox 's Inspect section.

Status: RESOLVED → UNCONFIRMED
OS: Windows 10 → Windows 11
Resolution: WORKSFORME → ---
Version: Firefox 84 → Firefox 110

If i drag the mouse on the page to select a custom area, Firefox shows this error in the lower right corner of the browser:

Shot Copied
Your shot has been copied to the clipboard.
Press CTRL-V to paste.

But Firefox doesn't save selected area screenshot and doesn't copy it.

I've not been able to reproduce this problem. There's a couple of things to try to narrow it down and figure out what's going on.
Can you go to about:config and set the screenshots.browser.component.enabled pref to true. This is a newer implementation of the Screenshots feature we are working on. If it works here (i.e. the screenshot image is actually placed on the clipboard as expected), the bug will be fixed when we ship this new implementation (no timeline yet but likely in the first half of this year.)
If that still doesnt work, it would be helpful to know if there are other extensions or configurations that might be interfering. Can you attach the contents of about:support here?
There may also be useful exceptions in the firefox console. shift+ctlr+j should open that. (This is not the same as the normal devtools console, it shows browser errors and logs, not just those of the content loaded into the browser)

Flags: needinfo?(saadi.shamsaee)
Attached file about:support
Setting screenshots.browser.component.enabled to true fixed the problem. Thank you.

(In reply to Saad Shamsaee from comment #11)

Setting screenshots.browser.component.enabled to true fixed the problem.

That's good to know. Looking at the about:support I see you have some extensions that might affect the clipboard functionality. Can you try reproducing the issue with screenshots.browser.component.enabled to false and using Safe Mode. I'm particularly suspicious of CanvasBlocker - that looks like it might interfere with the Screenshot extension's canvas -> clipboard functions.

Flags: needinfo?(saadi.shamsaee)

need info for comment 12

Flags: needinfo?(saadi.shamsaee)

(In reply to Sam Foster [:sfoster] (he/him) from comment #12)

(In reply to Saad Shamsaee from comment #11)

Setting screenshots.browser.component.enabled to true fixed the problem.

That's good to know. Looking at the about:support I see you have some extensions that might affect the clipboard functionality. Can you try reproducing the issue with screenshots.browser.component.enabled to false and using Safe Mode. I'm particularly suspicious of CanvasBlocker - that looks like it might interfere with the Screenshot extension's canvas -> clipboard functions.

I did this but the problem did not fixed.

Flags: needinfo?(saadi.shamsaee)

In Firefox (v113 Nightly) for taking screenshot of a pdf file i can't scroll page while dragging.

(In reply to Saad Shamsaee from comment #15)

In Firefox (v113 Nightly) for taking screenshot of a pdf file i can't scroll page while dragging.

This is bug 1778321 and separate from the clipboard issue we're investigating here.

The screenshots extension uses browser.clipboard.setImageData at https://searchfox.org/mozilla-central/source/browser/extensions/screenshots/background/main.js#159. In comment 11 we confirmed that this seems to trace to the extension actually placing of data on the clipboard. Do you have any other suggestions for how to isolate or troubleshoot this problem :robwu? Have we had any other reports of similar behavior from other extensions?

Flags: needinfo?(rob)

Though comment 7 suggests something about the region selection and image data preparation before we get to clipboard.setImageData() is going wrong.
This becomes a moot point once bug 1789727 ships, but I'd like to understand the underlying problem if possible, as if its not particular to the clipboard extension API, we might still run into it in the new implementation.

The only difference between the clipboard extension API and screenshots as a builtin component is that the extension API internally assigns to application/x-moz-nativeimage, while the Screenshots component assigns to image/png:

Since the underlying "application/x-moz-nativeimage" flavor is supposed to work (and it did when I tested back then), I am surprised that this report claims that it is not working.

Could you please provide the following information (with screenshots.browser.component.enabled set to false ):

  • What version of Firefox are you using?
  • What operating system are you using?
  • What "photo program" are you trying to paste into?
  • If you open data:text/html,<body contenteditable> and try to paste the image, does it appear?
  • If you open a new Firefox browser instance (different profile), without closing the original one where you took the screenshot, and repeat the previous step (i.e. pasting in data:text/html,<body contenteditable>), does the image appear?
  • If on Windows, does pasting in mspaint work?
Flags: needinfo?(rob)
See Also: → 1500206

I use Windows 11 and Firefox nightly. i use Paint.NET , when the screenshot is not copied, what difference does it make in which program it is pasted?

screenshots.browser.component.enabled
I want test but now, when this config is on false, the screenshot wizard screenshot process does not start at all. It doesn't work at all and nothing starts nothing loads for taking screenshot.

Should i run data:text/html,<body contenteditable> on urlbar of a page?

Sorry if there are grammatical mistakes in my words. My English is not good and I am taking help from Google text translator. I do not know how to use the text editor of this site. Sorry.

(In reply to Sam Foster [:sfoster] (he/him) from comment #10)

I've not been able to reproduce this problem. There's a couple of things to try to narrow it down and figure out what's going on.
Can you go to about:config and set the screenshots.browser.component.enabled pref to true. This is a newer implementation of the Screenshots feature we are working on. If it works here (i.e. the screenshot image is actually placed on the clipboard as expected), the bug will be fixed when we ship this new implementation (no timeline yet but likely in the first half of this year.)
If that still doesnt work, it would be helpful to know if there are other extensions or configurations that might be interfering. Can you attach the contents of about:support here?
There may also be useful exceptions in the firefox console. shift+ctlr+j should open that. (This is not the same as the normal devtools console, it shows browser errors and logs, not just those of the content loaded into the browser)

In Firefox 126 Beta, although this config is active(true), the old problem has arisen and the screenshot is not saved, only the text is displayed that the screenshot was saved in the memory, but nothing is saved in the memory.

There are a lot of flags here that something is going on outside of Firefox and it outside our control:

Each time with a new installation of Windows, the problem is fixed, but after a while, the problem returns again. And only with screenshot extensions can I take screenshots of pages.

And

screenshots.browser.component.enabled
I want test but now, when this config is on false, the screenshot wizard screenshot process does not start at all. It doesn't work at all and nothing starts nothing loads for taking screenshot.

Both of these are issues that we're unable to reproduce. We know the extension works, and there's no reason I can think of why copying and image from Firefox would work initially and then later stop working.

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

Attachment

General

Creator:
Created:
Updated:
Size: