Closed
Bug 1298942
Opened 8 years ago
Closed 8 years ago
onafterprint attribute
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1214805
People
(Reporter: abdjh, Unassigned, NeedInfo)
Details
(Whiteboard: [specification][type:bug])
What did you do? ================ I have a page which use onafterprint attribute on body tag, it was working fine a while ago, now its triggered only when I cancel print dialog!!! What happened? ============== onafterprint did not trigger when print What should have happened? ========================== onafterprint should trigger after print Is there anything else we should know? ======================================
Reporter | ||
Updated•8 years ago
|
Severity: normal → critical
Priority: -- → P1
Comment 1•8 years ago
|
||
Which application (name and version) are you using on which OS? Also, can you provide the testcase or the URL of the page the issue happens?
Component: Events → Untriaged
Flags: needinfo?(abdjh)
Product: Mozilla Developer Network → Firefox
Reporter | ||
Comment 2•8 years ago
|
||
It is local application so there is no online page to test on, and I tried it on Windows XP, and Windows 7, same on both, and one more note same code on IE still working (but as you know IE dose not work good with styles), thank you for your response.
Reporter | ||
Updated•8 years ago
|
OS: Other → Windows 7
Hardware: All → x86_64
Version: unspecified → 48 Branch
Reporter | ||
Updated•8 years ago
|
Version: 48 Branch → unspecified
Comment 3•8 years ago
|
||
Sorry, I meant * Which browser or mailer is this bug about? * What's the version of it? About testcase, can you prepare a minimal testcase, or provide the following information? * How is print function is executed? with JavaScript (window.print() function) or browser/mailer's menu? * How is the onafterprint attribute is set? (in HTML or via JavaScript?) * What do you do in onafterpaint attribute? There's similar issue in bug 1214805, but it's still not clear whether this bug is a duplicate of it or not.
See Also: → 1214805
Reporter | ||
Comment 4•8 years ago
|
||
yes this case just like (bug 1214805), I searched all night about it and then open a new case, my browser info is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0 and two other PCs with Windows XP and Windows 7 (both 32bit and 64bit)
Comment 5•8 years ago
|
||
thank you for the information. Can you also answer this? > About testcase, can you prepare a minimal testcase, or provide the following > information? > * How is print function is executed? with JavaScript (window.print() > function) or browser/mailer's menu? > * How is the onafterprint attribute is set? (in HTML or via JavaScript?) > * What do you do in onafterprint attribute? or perhaps all of those are *exactly* same as bug 1214805's testcase?
Updated•8 years ago
|
Severity: critical → normal
Priority: P1 → --
Version: unspecified → 48 Branch
Reporter | ||
Comment 6•8 years ago
|
||
print function from javascript window.print() on body tag on onload attribute like this: <body onload="window.print()" onafterprint="[calling a function]"> and I think this will answer all your questions, and btw it was like that since day 1 and it was working fine, and a while ago stopped!!!
Flags: needinfo?(abdjh)
Comment 7•8 years ago
|
||
Thanks.
Unfortunately it doesn't answer the following question.
> * What do you do in onafterprint attribute?
What does the function called in onafterprint do, and what's the actual difference between expected behavior and actual behavior?
Does the function do page navigation, or modify DOM structure, or something else?
Flags: needinfo?(abdjh)
Reporter | ||
Comment 8•8 years ago
|
||
<body onload="window.print()" onafterprint="document.location='?move=nextpage'">
Comment 9•8 years ago
|
||
Thank you for your answer :) now it's clear that this bug is a duplicate of bug 1214805.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(abdjh)
Resolution: --- → DUPLICATE
See Also: 1214805 →
Comment 10•8 years ago
|
||
So this isn't a regression, I assume? Or did some older version of Firefox work ok?
Flags: needinfo?(abdjh)
Comment 11•8 years ago
|
||
bug 1214805 is a regression in 38.
Comment 12•8 years ago
|
||
in 38?
Comment 13•8 years ago
|
||
I meant Firefox 38. Here's regression range from bug 1214805 comment #3 https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c0f88b376e33&tochange=c18776175a69
You need to log in
before you can comment on or make changes to this bug.
Description
•