Printing the selection from the context menu doesn't capture the page title (which might end up falling back to "Firefox" if there's no URI)
Categories
(Toolkit :: Printing, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox133 | --- | fixed |
People
(Reporter: mattias.roy, Assigned: mstriemer)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0
Steps to reproduce:
Website-Inhalte gedruckt
Actual results:
Seit 12.08.2024 zeigt Firefox beim Drucken von Websitetexten bei aktivierter Option "Kopf- und Fußzeile drucken" in der Kopfzeile nicht mehr den Websitenamen an, stattdessen steht an deren Stelle "Firefox".
Expected results:
Es hätte der Websitename oben links stehen sollen.
Comment 1•2 months ago
|
||
I can't replicate on macOS and Nightly (Firefox 132), or Release (130).
Are you using the default print dialog, or are you switching to the system dialog?
Does it happen on all sites?
Not sure why the first page in your attachment is vertical, and the second landscape
https://www.nachdenkseiten.de/?p=120732
P.S. Bug reports on Bugzilla should be in English, using machine translation is fine in most cases.
Reporter | ||
Comment 2•2 months ago
|
||
Hello, it is not a mistake. It does not always occur, only when selecting text passages, which I want to mark with the mouse and then have the selection printed.
I apologise.
Assignee | ||
Comment 3•2 months ago
|
||
Hello, how are you initiating the print? Is it from the right-click/context menu > Print selection... or through the primary Print shortcut/menu item and then changing the format to "Selection"? Does it also say Firefox for the entire page or just the selection? What version of Windows are you on?
Can you include a screenshot of the dialog where it's showing a preview with the Firefox text?
Reporter | ||
Comment 4•2 months ago
|
||
Hallo,
in der Kopfzeile erscheint "Firefox" dann, wenn ich Text einer Website markieren und diesen über das Kontextmenü "Auswahl drucken" an den Drucker weiterleite. Ich war der Ansicht, dass dann statt "Firefox" der Name der Website ausgegeben werden müsste.
Nutze ich aber die Druckfunktion, die eine Website selbst zur Verfügung stellt, erscheint dann auch der Name der Website in der Kopfzeile.
Ich fände es gut, wenn der Browser immer den Namen der Website mit ausgibt. Schön wäre auch ein Menü, in dem der Nutzer auswählen kann, was in der Kopf- und Fußzeile ausgegeben wird. Ähnlich wie bei den Office-Programmen.
Auf meinem Rechner läuft Windows 10 22H2 19045.4842.
Ich nutze zur Kommunikation die maschinelle Übersetzung des Browsers, ist eine gute Eigenschaft.
Hello,
"Firefox" appears in the header when I mark text on a website and forward it to the printer via the context menu "Print selection". I thought that instead of "Firefox", the name of the website would have to be displayed.
However, I use the print function, which a website itself makes available, the name of the website will then also appear in the header.
I think it would be good if the browser always includes the name of the website. It would also be nice to include a menu in which the user can choose what is output in the header and footer. Similar to the Office programs.
My computer runs Windows 10 22H2 19045.4842.
I use the machine translation of the browser to communicate, is a good feature.
Assignee | ||
Comment 5•1 month ago
|
||
Emilio, I'm not able to reproduce this bug, getting "Firefox" to be shown as the page title. When I print selection from the context menu I see the URL instead of the title for the page. Do you know if there's some way that may fall back to a default title in this case to cause this bug? Do you think this might be fixed by something like providing the page title from the primary document before we extract the selection content for printing?
Comment 6•1 month ago
|
||
(In reply to Mark Striemer [:mstriemer] from comment #5)
Emilio, I'm not able to reproduce this bug, getting "Firefox" to be shown as the page title. When I print selection from the context menu I see the URL instead of the title for the page.
Yeah, I can see that. That does seem worth fixing.
Do you know if there's some way that may fall back to a default title in this case to cause this bug?
Yes, somewhat surprisingly: https://searchfox.org/mozilla-central/rev/c169f7d0287c1a6a5dd7469864135e605eed765f/layout/printing/nsPrintJob.cpp#533
I guess if in some site we end up getting a blank URI / empty docURL from the settings we could hit what the reporter is seeing. It seems fixing the above bug would also fix this.
Do you think this might be fixed by something like providing the page title from the primary document before we extract the selection content for printing?
Yeah, that seems about right. Or capturing the title before-hand... It seems this call should happen before we remove the title in here, but not 100% sure that's the code-path we're hitting without more debugging, and it's quite late here... Does that fix it on your end?
Reporter | ||
Comment 7•1 month ago
|
||
Hallo, ich kann Ihrer Diskussion nicht folgen. Muss ich etwas tun? Wenn ja, können Sie mir bitte mitteilen, was ich tun soll.
Hello, I can't follow your discussion. Do I need to do something? If so, please tell me what I should do.
Comment 8•1 month ago
|
||
No, I think we understand what is going on. Thanks!
Updated•1 month ago
|
Comment hidden (off-topic) |
Assignee | ||
Comment 10•1 month ago
|
||
Providing the title in the settings does indeed work. Attaching a patch here that does that, if you think we should solve this in nsPrintJob though I'm good with abandoning the patch
Assignee | ||
Comment 11•1 month ago
|
||
Updated•1 month ago
|
Comment hidden (off-topic) |
Comment hidden (off-topic) |
Comment hidden (off-topic) |
Comment hidden (off-topic) |
Assignee | ||
Updated•1 month ago
|
Comment 16•4 days ago
|
||
Comment 17•4 days ago
|
||
bugherder |
Description
•