Add a "Print selection only" menu item to the context menu when there is a selection
Categories
(Toolkit :: Printing, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox83 | --- | fixed |
People
(Reporter: stefan.bach, Assigned: emilio, NeedInfo)
References
Details
(Whiteboard: [print2020_v83][old-ui-])
Attachments
(1 file)
When I want to print just a part of some web page I can select to print only the marked text in the printing dialog that appears when selecting File - Print. But I can't preview how the result will look like because there is no such option in the print preview. The printing dialog only offers Ok and Cancel, no Apply option to preview the changes. The same applies to the Print Frames options in the printing dialog. I haven't found an option to preview the different options. (Or is it there and I just can't find it?) Adding those options to print preview would be a great enhancement.
Comment 2•19 years ago
|
||
Nice enhancement, at this time I don't IE even does a PP of the selection.
Comment 3•19 years ago
|
||
*** Bug 144695 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
This is becoming increasingly desirable with all the extraneous **** on webpages
these days. I almost exclusively use "print selection" -- everyone that knows
about this feature loves it.
Print preview support of print selection (I'm thinking a button in preview
mode called "selection" that could be switched on or off to preview whatever had
been selected prior to entering the preview window) would give mozilla a nice
edge over IE.
on a similar note:
Print preview should not cause deselection (it currently does in 1.7)
and print selection should be implemented in Mail (there is a bug for this).
Comment 5•16 years ago
|
||
this is out of scope for Fx2, which is mostly a front end update, touching very little in the Gecko core.
If this can't make it into Fx 2.x, please at least add this for Fx 3.0. I run into this inconvenience almost every time I want to print, as there's usually stuff on the page I don't want to print and there's not way to preview the selection to see how it's going to turn out. Thanks.
The Mac version of Fx may need special attention to get this working, as it's not a part of the standard print dialog. But it'd certainly be welcome. Don't know why Apple has never bothered to include this feature...
(In reply to comment #7) > The Mac version of Fx may need special attention to get this working, as it's > not a part of the standard print dialog. But it'd certainly be welcome. Don't > know why Apple has never bothered to include this feature... > DOH! Of course it's right after I push the Commit button that I think to look at the Fx-specific portion of the dialog and discover that the feature is already there. Sorry. :-/
Updated•13 years ago
|
Comment 9•12 years ago
|
||
Print preview still causes deselect in Firefox 3.0.7. This is needed more than ever. Firefox superzoom bug (ignore scale -> print at >100%) makes this even more desperately needed.
Comment 11•12 years ago
|
||
I absolutely agree, this bug annoys me since almost three years, a fix would be very appreciated, thanks alot in advance :)
Comment 13•12 years ago
|
||
As FYI, IE7 does support this functionality (choose "Print Preview", then "As selected on screen") - if/when addressing this item, please also try to look at the Print Frames option for rendering accuracy. Thank you
Updated•10 years ago
|
Comment 14•9 years ago
|
||
Adding print-selection for text search.
Comment 17•3 years ago
|
||
The UI that bug 650966 was aiming to implement would fix this (there would be something like a "Selection only" checkbox that could be toggled in a Print Settings bar located to the side of the print preview contents).
Comment 18•9 months ago
|
||
Mark, from the platform side, this should be supported by FrameLoader.printPreview now. You'd create a separate browser element for the selection print preview document, and do something like this when first creating the selection print preview document:
// Clone and get the selection from the original print preview document:
let originalPreviewBrowserWindowID = <get this>;
settings.printRange = Ci.nsIPrintSettings.kRangeSelection;
let {
totalPageCount,
} = await selectionPreviewBrowser.frameLoader.printPreview(
settings, originalPreviewBrowserWindowID);
Comment 20•8 months ago
|
||
Emilio, I believe what's described in comment 18 is Fission compatible. Let me know if you see issues with that.
| Assignee | ||
Comment 21•8 months ago
|
||
I don't think so, specially if the selected text is in the OOP iframe. I don't think that works at all right now.
Comment 22•8 months ago
|
||
We should bump this to P1 given it's one of our two highest-priority features for 83. That said, it sounds like per comment 21 a checkbox is still not an easy option.
| Assignee | ||
Comment 23•8 months ago
|
||
I'll try to prototype something, even though maybe not a checkbox... :-)
Comment 24•8 months ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #21)
I don't think so, specially if the selected text is in the OOP iframe. I don't think that works at all right now.
If we had a field on BrowsingContext to indicate which BrowsingContexts have a selection, we could do a depth first traversal of them and select the first with a selection (or maybe something smarter [in future], such as preferring the first with a selection that is on-screen). We could then clone that BrowsingContext into a second print preview browser, setting Ci.nsIPrintSettings.kRangeSelection on the settings object that we pass when making the clone.
| Assignee | ||
Comment 25•8 months ago
|
||
Is there an objection to making this work more like how "View selection source" works? Seems very similar to that feature.
Comment 26•8 months ago
|
||
By which you mean it would require using the context menu? Yeah, mainly that it's not very discoverable, and we wouldn't have parity with Chrome's much more discoverable checkbox in the print UI.
Comment 27•8 months ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #24)
If we had a field on BrowsingContext to indicate which BrowsingContexts have a selection
If it matters, we could set this field only for static clone docs (i.e. during the original clone).
| Assignee | ||
Comment 28•8 months ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #26)
By which you mean it would require using the context menu? Yeah, mainly that it's not very discoverable, and we wouldn't have parity with Chrome's much more discoverable checkbox in the print UI.
I disagree with this argument FWIW. I didn't even know Chrome had such a feature, because you need to select before printing (which if you don't know the feature exists, you never do). Otherwise you'll never see the checkbox.
A context menu item seems much more discoverable to me, because it's where most of the other selection actions are, but maybe it's just me.
| Assignee | ||
Comment 29•8 months ago
|
||
In fact, Chrome has a context menu > Print entry, when you have selected text.
| Assignee | ||
Comment 30•8 months ago
|
||
(well, and when you don't, but it defaults to "Print selection only" when there's a selection)
| Assignee | ||
Comment 31•8 months ago
|
||
This allows to use the feature from the context menu and is very
straight-forward.
This has the benefit of working with fission (as print from the focused
frame) and so on.
Making a checkbox on the UI on top of this is doable, but it is a lot
more complex (requires a bunch of both front-end and platform work)
because undoing this implies restoring the DOM which "print selection"
removes.
I think the context menu entry is very useful regardless of whether we
add a checkbox to undo it, and other browsers (with smaller context
menus) seem to agree.
Updated•8 months ago
|
| Assignee | ||
Comment 32•8 months ago
|
||
This is partial in the sense that it doesn't implement the actual checkbox to undo it. I think it's worth landing regardless, but let me know if you disagree.
In any case bug 1668767 should unblock most of the other work (I think we should be able to make the front-end work with that, modulo fission-compat, which is platform work).
Comment 34•8 months ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3fa0c4e1bb95 Add a "Print selection only" entry to the context menu. r=Gijs,jwatt,fluent-reviewers
Comment 35•8 months ago
|
||
| bugherder | ||
Comment 36•8 months ago
|
||
Changing the bug title to reflect what was actually implemented for this bug report.
I've spun off bug 1670122 to cover adding a "Print selection only" checkbox in the new print UI.
Description
•