2

Take a screenshot option is missing in a frame

 3 years ago
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1679313
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Closed Bug 1679313 Opened 7 months ago Closed 22 days ago

Take a screenshot option is missing in a frame

Categories

(Firefox :: Screenshots, defect, P3)

Tracking

(bug RESOLVED as FIXED)

RESOLVED FIXED

91 Branch

Tracking Status firefox91 --- fixed

People

(Reporter: martijn, Assigned: kajalsah107)

References

Details

default.jpg

Reporter

Description

7 months ago

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

Steps to reproduce:

Right click on an empty bit of a page to select "Take a screenshot".

Actual results:

The whole option is missing, because I happen to right-click in a frame.

Expected results:

There's no reason for "Take a screenshot" to be missing when right-clicking in a frame. This is especially bad when a page consists of one giant page-filling iframe - this will basically destroy the screenshot function.

The option also isn't anywhere in the classic menu, not in the hamburger menu, nor does it have a keyboard shortcut. The context menu is literally the only way to get to the screenshotting function, and that option doesn't work in a frame.

Please note that in the user's perspective, they don't care if something happens to be a frame, and they certainly can't recognize one. Firefox should not arbitrarily hide functions that are page-wide (like screenshot).

default.jpg

Reporter

Comment 1

7 months ago

And I still can't correct a bloody typo in my report above. Wow.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Screenshots

Hey Martijn, thanks for reporting this!

Do you mind providing an example of a website where this problem occurs?

Flags: needinfo?(martijn)
default.jpg

Reporter

Comment 4

7 months ago

Sure, here's one example:
https://next--storybookjs.netlify.app
In case you're unfamiliar with Storybook, the Canvas pane is one giant iframe, and you will not get the screenshot option in the context menu there.

But in general the menu item is missing on any iframe, not just that one.

Flags: needinfo?(martijn)

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)

(In reply to Martijn from comment #0)

The option also isn't anywhere in the classic menu, not in the hamburger menu, nor does it have a keyboard shortcut. The context menu is literally the only way to get to the screenshotting function, and that option doesn't work in a frame.

It also exists in the page action menu (dots in the hamburger menu), and you can right click it to make it a permanently-visible item in the address bar, if this is a feature you use often.

There's also a shortcut - ctrl-shift-s.

Severity: -- → S4
Flags: needinfo?(emalysz)
Priority: -- → P3

I just noticed this bug on https://console.aws.amazon.com — Firefox 88 removed the page action menu so I hadn't noticed it was missing from some context menus.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Meridel, is the "Take a screenshot" item something we should consider adding to the image-only context menu?
https://docs.google.com/presentation/d/1Ufd0A3HsziyXXAjXYNH84P2bu7RdTxARsA0xpKmwIWs/edit#slide=id.gb7754f26c5_10_34. I think that may make sense given images can take up a large portion of the screen (making the screenshots option unavailable in the context menu if they click the image) and that images are often what people hope to capture in their screenshots

If not, I think we should close this as WONTFIX.

Flags: needinfo?(mwalkington)

The Image Context menu already contains "Save Image As..." Doesn't this achieve the same end goal as "Take Screenshot", or is it that people want the ability to crop and screenshot a selection of the image? Thoughts?

Flags: needinfo?(mwalkington)
Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Meridel [:meridel] from comment #9)

The Image Context menu already contains "Save Image As..." Doesn't this achieve the same end goal as "Take Screenshot", or is it that people want the ability to crop and screenshot a selection of the image? Thoughts?

I'm unsure, passing back to Emma.

Also, Emma, can you clarify why you asked about images? Are the frames this bug mentions normally filled with images?

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(emalysz)

Ah, I had just clicked directly on the image that was nested within the frame. With both images and frames, there are indeed options to "Save ____ as".

Saving is not directly the same as taking a screenshot, as we provide additional functionality to copy, save the entire page, or save the visible portion of the page. However, since images also provide us with the copy ability, I think it's fair to leave it out of there.

(In reply to Martijn from comment #4)

In case you're unfamiliar with Storybook, the Canvas pane is one giant iframe, and you will not get the screenshot option in the context menu there.
But in general the menu item is missing on any iframe, not just that one.

I think the reporter makes a valid point for clicking within iframes though. The "Save frame as" is a nested context menu option, and there is no ability to copy the frame. Images and different elements can be contained within the frame that the user is hoping to select some/all of for screenshots.

The context menu for that case currently has:

Select All
______
This Frame
_____

What do we think about making this:

Select All
____
Take a screenshot
_____
This frame
_____
Flags: needinfo?(emalysz) → needinfo?(mwalkington)

Emma, can you share a screenshot of the entire context menu for the iframe context?

Flags: needinfo?(mwalkington) → needinfo?(emalysz)

I attached a screenshot to the bug with the iframe context.

The fix for this would be pretty simple and involve removing this line: https://searchfox.org/mozilla-central/rev/71515d047cbdd02687a1b9b7265f2ffb51300bf1/browser/base/content/nsContextMenu.js#1143.
That would get us to the structure I mentioned from comment #11

Flags: needinfo?(emalysz)
Flags: needinfo?(mwalkington)

I think this bug should be a higher priority. Now that the screenshot option has been removed from the page info menu, and it's not always clear when content is in an iframe, it may be confusing when the screenshot option is not present.

Severity: S4 → S3

Since the image only context menu already includes options for saving and copying an image, and to avoid adding an additional item to all image context menus, could we populate the "Take Screenshot" option within the "This Frame" submenu?

Flags: needinfo?(mwalkington) → needinfo?(emalysz)

Confirmed with Meridel that we should place the option in the subframe. The subframe should look something like:

Print Frame...
-------
Take a Screenshot
-------
View Frame Source
Flags: needinfo?(emalysz)
Assignee: nobody → kajalsah107
Status: NEW → ASSIGNED
Duplicate of this bug: 1707413
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK