Printing via window.print() from a popup window which closes itself does no longer work
Categories
(Toolkit :: Printing, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: whimboo, Unassigned)
References
Details
(Keywords: steps-wanted, Whiteboard: [print2020_v81])
Some pages use Javascript to trigger the printing of the page. When this is done from within a popup, which closes itself afterward, doesn't work anymore. The print ui flashes slightly but then window.close()
closes the popup including the print dialog.
Here the JavaScript code as used:
<script type="text/javascript">
function printContent() {
var info = document.getElementById ('buttons');
info.style.visibility='hidden';
window.print();
info.style.visibility='visible';
window.close();
}
</script>
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Can you link to a live testcase, or is it behind a login or something?
Comment 2•4 years ago
|
||
We should get this fixed, I don't think we should ship without that working. There's another report for this from today as well, though on the phone so can't find it right now.
Comment 3•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)
We should get this fixed, I don't think we should ship without that working.
I agree this seems bad, but the steps here are not sufficient to reproduce. In particular, running:
window.open("data:text/html,<script>window.print(); window.close();</script>", "_blank", "height=300")
from a given page closes immediately and no dialog is ever shown, even in Firefox 79, or in current nightly with the tab modal print stuff preffed off, so I don't think this ever worked...
There's another report for this from today as well, though on the phone so can't find it right now.
Maybe bug 1662975?
Comment 4•4 years ago
|
||
The steps in the other bug at least reproduce the issue for me, so let's dupe there.
Reporter | ||
Comment 5•4 years ago
|
||
That works now with the fix on bug 1662975.
Updated•4 years ago
|
Description
•