Index: chrome/browser/resources/print_preview/margin_settings.js |
diff --git a/chrome/browser/resources/print_preview/margin_settings.js b/chrome/browser/resources/print_preview/margin_settings.js |
index 1485e9af6de643dc7b80ff353ba2240a15614e73..c30d2f665b92a5c1ec41c5e8d5b63c095bed5b54 100644 |
--- a/chrome/browser/resources/print_preview/margin_settings.js |
+++ b/chrome/browser/resources/print_preview/margin_settings.js |
@@ -291,6 +291,18 @@ cr.define('print_preview', function() { |
addEventListeners_: function() { |
this.marginList_.onchange = this.onMarginsChanged_.bind(this); |
document.addEventListener('PDFLoaded', this.onPDFLoaded_.bind(this)); |
+ document.addEventListener('errorOccurred', |
+ this.onErrorOccurred.bind(this)); |
+ }, |
+ |
+ /** |
+ * Executes when an 'errorOccurred' event occurs. |
+ */ |
+ onErrorOccurred: function() { |
Evan Stade
2011/10/19 22:34:11
private
dpapad
2011/10/19 22:56:21
Done.
|
+ if (this.isCustomMarginsSelected()) { |
+ this.removeCustomMarginEventListeners_(); |
+ this.marginsUI.hide(); |
+ } |
}, |
/** |