Closed Bug 1662996 Opened 4 years ago Closed 4 years ago

Printing via window.print() from a popup window which closes itself does no longer work

Categories

(Toolkit :: Printing, defect, P2)

Firefox 82
defect

Tracking

()

VERIFIED DUPLICATE of bug 1662975
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>
Severity: -- → S3
Priority: -- → P2
Whiteboard: [print2020_v81]

Can you link to a live testcase, or is it behind a login or something?

Flags: needinfo?(hskupin)

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.

(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?

Keywords: steps-wanted

The steps in the other bug at least reproduce the issue for me, so let's dupe there.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Regressions: 1663290
No longer regressions: 1663290

That works now with the fix on bug 1662975.

Status: RESOLVED → VERIFIED
Flags: needinfo?(hskupin)
You need to log in before you can comment on or make changes to this bug.