Problem in take screenshot when selecting a custom region
Categories
(Firefox :: Screenshots, defect, P2)
Tracking
()
People
(Reporter: saadi.shamsaee, Unassigned)
References
Details
Attachments
(1 file)
58.46 KB,
text/plain
|
Details |
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.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
to correct the sentence:
If from the beginning, I drag the mouse on the page to select a custom "region",
Comment 2•4 years ago
|
||
The severity field is not set for this bug.
:emalysz, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
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.
Reporter | ||
Comment 4•4 years ago
|
||
I'm currently using Firefox 85 Stable and there is not problem in taking screenshots anymore for me.
Comment 5•3 years ago
|
||
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)
Reporter | ||
Comment 6•3 years ago
|
||
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.
Reporter | ||
Comment 7•3 years ago
|
||
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.
Reporter | ||
Comment 8•2 years ago
|
||
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.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 9•2 years ago
|
||
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.
Comment 10•2 years ago
|
||
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)
Reporter | ||
Comment 11•2 years ago
|
||
Comment 12•2 years ago
|
||
(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.
Reporter | ||
Comment 14•2 years ago
|
||
(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.
Reporter | ||
Comment 15•2 years ago
|
||
In Firefox (v113 Nightly) for taking screenshot of a pdf file i can't scroll page while dragging.
Comment 16•2 years ago
|
||
(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.
Comment 17•2 years ago
•
|
||
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?
Comment 18•2 years ago
|
||
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.
Comment 19•2 years ago
|
||
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
:
- Screenshots: https://searchfox.org/mozilla-central/rev/11dbac7f64f509b78037465cbb4427ed71f8b565/browser/components/screenshots/ScreenshotsUtils.sys.mjs#481-482
- This logic was introduced in bug 1741740; the logic looks like a copy of the devtools implementation, which in turn looks like a copy of the original implementation of the
clipboard.setImageData
API implementation (5 years ago, in bug 1472673, 2018-07-11, Fx63), before the change from bug 1500206 (see below).
- This logic was introduced in bug 1741740; the logic looks like a copy of the devtools implementation, which in turn looks like a copy of the original implementation of the
clipboard.setImageData
: https://searchfox.org/mozilla-central/rev/11dbac7f64f509b78037465cbb4427ed71f8b565/toolkit/components/extensions/parent/ext-clipboard.js#58-59,66-76- used to copy to
image/png
(or jpg), but changed toapplication/x-moz-nativeimage
in bug 1500206 (5 years ago, 2018-10-22, Fx65) - diff: https://searchfox.org/mozilla-central/diff/a60ebfae5ec334b133147d779285c8b38917f98a/toolkit/components/extensions/parent/ext-clipboard.js#41
- Reasoning behind the change: https://phabricator.services.mozilla.com/D9132#219594
- Verified to work with mspaint on Windows 7 back then: https://phabricator.services.mozilla.com/D9132#222585
- used to copy to
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?
Reporter | ||
Comment 20•2 years ago
|
||
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.
Reporter | ||
Comment 21•9 months ago
|
||
(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 toabout:config
and set thescreenshots.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 ofabout: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.
Comment 22•8 months ago
|
||
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.
Description
•