Closed Bug 289673 Opened 19 years ago Closed 19 years ago

Printing hangs on javascript print() call for frame of 0 height

Categories

(Core :: Printing: Output, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 197556

People

(Reporter: jolmstead, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050408
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050408

When calling the print() method of a frame that has its height or width set to
zero by the frames set cases printing to hang.  This creates a condition for
Mozilla Bug 244705: link to browser window in Print Preview mode results in "The
document cannot change while Printing or in Print Preview.". 

Reproducible: Always

Steps to Reproduce:
1) Create a frameset containing local content. Create two frames in the
frameset, the first frame containing a local page with a button that calls
window.top.printFrame(), the second containing any local content.  Set the
frameset so the top frame has a row heigh of 100%, the second 0.  Add a function
printFrame() that calls print on the hidden frame.  Your frameset page should
look something like this:

<html>
    <script>
    function printFrame() {
        window.frames[0].print();
    }
    </script>
<frameset rows = "100%, 0">
      <frame src ="buttons.html"/>
      <frame src ="content.html"/>
</frameset>
</html>

2) now open the page and click on the button to call printFrame().   The print
dialog will appear, click on print.

Actual Results:  
The Printing dialog will remain open and printing will hang.  If you close the
print dialog and try to enter a new URL, you will see the message "The document
cannot change while Printing or in Print Preview" (see Mozilla Bug 244705)

Expected Results:  
Frame content should have printed.
Sorry, the example should refence frames[1] instead of frames[0]

window.frames[1].print();
Attached file Testcase
Confirmed with the latest nightly trunk build (2005-04-08).
After closing the print dialog, I don't get an alert dialog, but I can't change
to a different site on that page.
This is a duplicate of bug 197556, I'll attach the testcase there.

*** This bug has been marked as a duplicate of 197556 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Component: General → Printing
Product: Mozilla Application Suite → Core
Resolution: --- → DUPLICATE
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: