Last Comment Bug 308173 - Printing reverts to default printer every time a page is printed
: Printing reverts to default printer every time a page is printed
Status: RESOLVED FIXED
: fixed1.8, regression
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: Trunk
: All All
: P1 normal (vote)
: mozilla1.8beta5
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan)
:
:
Mentors:
: 256680 395820 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-12 09:05 PDT by Adam T.
Modified: 2010-02-24 06:28 PST (History)
5 users (show)
asa: blocking1.8b5+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch rv1.0 for 'javascript:window.print()' (1.51 KB, patch)
2005-09-14 12:21 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
jst: review+
jst: superreview+
asa: approval1.8b5+
Details | Diff | Splinter Review
Patch for suite (1.61 KB, patch)
2005-09-14 12:22 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
neil: review+
neil: superreview+
asa: approval1.8b5+
Details | Diff | Splinter Review
Patch for Firefox(toolkit) (1.51 KB, patch)
2005-09-14 12:27 PDT, Masayuki Nakano [:masayuki] (Mozilla Japan)
mconnor: review+
asa: approval1.8b5+
Details | Diff | Splinter Review

Description Adam T. 2005-09-12 09:05:53 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4

When printing a page with Firefox <= 1.0.6, if you chose to print any subsequent
pages after the first, Firefox would automatically select the last printer you used.

In Firefox 1.5 Beta 1, every time you print a new Web page, the print dialog
reverts to the default printer as listed in the Printers section of the Windows
Control Panel. This can be annoying if a printer on the network is offline and
you do not want to manually change the default printer for your current browsing
session.

Reproducible: Always

Steps to Reproduce:
1. Navigate to any Web page
2. Select "File -> Print..." from the menubar


Actual Results:  
I realized the printer kept switching back to the default printer!

Expected Results:  
I think the software should behave like its predecessors in that the default
printer should display ONLY if another printer has not been chosen for the
current browsing session. Once another printer has been chosen, it should
persist throughout that session.
Comment 1 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-12 12:35:43 PDT
I changed to current behavior in bug 118563. I don't think that the default
browser should be selected at first printing in current session...
Comment 2 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-12 12:36:58 PDT
> I don't think that the default
> browser should be selected at first printing in current session...

Sorry.

I don't think that the default printer should be selected at first printing in
current session...
Comment 3 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-12 12:42:08 PDT
Oops. Sorry. I missed to understand this report.

On currently behavior, we keep the last printer in prefs.js. And next printing
time, last printer is selected and last print setting comes back. In your
environment, Isn't firefox working so?
Comment 4 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-12 12:56:50 PDT
O.K. I reproduced it.
Comment 5 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-12 13:40:54 PDT
taking. I will create the patch in several days.
Comment 6 Andreas Lange 2005-09-14 06:59:12 PDT
Same as bug 256680?
Comment 7 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-14 07:17:43 PDT
*** Bug 256680 has been marked as a duplicate of this bug. ***
Comment 8 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-14 12:21:05 PDT
Created attachment 196067 [details] [diff] [review]
Patch rv1.0 for 'javascript:window.print()'
Comment 9 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-14 12:22:39 PDT
Created attachment 196068 [details] [diff] [review]
Patch for suite
Comment 10 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-14 12:27:55 PDT
Created attachment 196069 [details] [diff] [review]
Patch for Firefox(toolkit)
Comment 11 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-14 12:39:24 PDT
These patches are very simple.

When |nsPrintSettings| is initialized, it using the value of
"print.print_printer". Therefore, we should save last printer name to here.

# NOTE: I think that if using XP print dialog(toolkit's printdialog.js and
xpfe's printdialog.js), this bug may not be fixed by my patch. Because
printdialog.js has original printing code.(I will test tomorrow or soon, if I
found same problem on XP print dialog, I will file a bug and create the patch.)
Comment 12 Johnny Stenback (:jst, jst@mozilla.com) 2005-09-14 17:51:35 PDT
Comment on attachment 196067 [details] [diff] [review]
Patch rv1.0 for 'javascript:window.print()'

r+sr=jst
Comment 13 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 08:17:15 PDT
Comment on attachment 196067 [details] [diff] [review]
Patch rv1.0 for 'javascript:window.print()'

checked-in this.
Comment 14 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 08:17:42 PDT
Comment on attachment 196069 [details] [diff] [review]
Patch for Firefox(toolkit)

checked-in this.
Comment 15 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 08:21:07 PDT
Could anyone test that checked-in patch works fine or not on Linux(Firefox)?
I cannot test on Linux. Because I cannot add printer to Mozilla.
Comment 16 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 09:02:49 PDT
Comment on attachment 196067 [details] [diff] [review]
Patch rv1.0 for 'javascript:window.print()'

This has very low risk. And it is regression from Firefox 1.0.x(Gecko1.7.x).
This bug is very inconvenience.
Comment 17 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 09:03:23 PDT
Comment on attachment 196068 [details] [diff] [review]
Patch for suite

See previous comment.
Comment 18 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 09:03:47 PDT
Comment on attachment 196069 [details] [diff] [review]
Patch for Firefox(toolkit)

See previous comment.
Comment 19 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 09:10:19 PDT
Suite's patch is checked-in.
Comment 20 Masayuki Nakano [:masayuki] (Mozilla Japan) 2005-09-15 22:30:03 PDT
checked-in to branch.
Comment 21 :Hb 2009-12-21 04:08:29 PST
*** Bug 395820 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.