Fix for bug 830342 (Scale combobox is broken in print-preview, after selecting "Custom" and then hitting "Cancel" on its spawned dialog). r=dolske.
authorPeter Van der Beken <peterv@propagandism.org>
Thu, 17 Jan 2013 12:16:33 +0100
changeset 122136 f98f9cf410fe30d5bb382209071bea488af7d602
parent 122135 159954333c5ebe635ad1c463253f81f1f190a913
child 122137 331e2dcd93d7fc93d4eae8f7c2c00920886c1f00
push id24319
push userryanvm@gmail.com
push dateSat, 16 Feb 2013 23:49:46 +0000
treeherdermozilla-central@c4de6de47382 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdolske
bugs830342
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Fix for bug 830342 (Scale combobox is broken in print-preview, after selecting "Custom" and then hitting "Cancel" on its spawned dialog). r=dolske.
toolkit/components/printing/content/printPreviewBindings.xml
--- a/toolkit/components/printing/content/printPreviewBindings.xml
+++ b/toolkit/components/printing/content/printPreviewBindings.xml
@@ -289,17 +289,19 @@
             return;
           }
 
           if (aValue == "Custom") {
             aValue = this.promptForScaleValue(settings.scaling * 100.0);
             if (aValue >= 10) {
               aValue /= 100.0;
             } else {
-              this.mScaleCombobox.selectedIndex = this.mScaleCombobox.getAttribute('lastValidInx');
+              if (this.mScaleCombobox.hasAttribute('lastValidInx')) {
+                this.mScaleCombobox.selectedIndex = this.mScaleCombobox.getAttribute('lastValidInx');
+              }
               return;
             }
           }
 
           this.setScaleCombobox(aValue);
           this.mScaleCombobox.setAttribute('lastValidInx', this.mScaleCombobox.selectedIndex);
 
           if (settings.scaling != aValue || settings.shrinkToFit)