Index: chrome/browser/resources/print_preview/print_preview.js |
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js |
index 9aca1011579918c2ddbf3815ab47b5497073101c..8c1d3829d9acfc1df8870a15168f764b9ef2b283 100644 |
--- a/chrome/browser/resources/print_preview/print_preview.js |
+++ b/chrome/browser/resources/print_preview/print_preview.js |
@@ -769,9 +769,13 @@ cr.define('print_preview', function() { |
!this.destinationSearch_.getIsVisible() && |
this.printTicketStore_.isTicketValid()) { |
assert(this.uiState_ == PrintPreview.UiState_.READY, |
- 'Trying to print when not in ready state: ' + this.uiState_); |
- this.printDocumentOrOpenPdfPreview_(false /*isPdfPreview*/); |
- e.preventDefault(); |
+ 'Trying to print when not in ready state: ' + this.uiState_); |
+ var activeElementTag = document.activeElement ? |
+ document.activeElement.tagName.toUpperCase() : ''; |
+ if (activeElementTag != 'BUTTON' && activeElementTag != 'SELECT') { |
+ this.printDocumentOrOpenPdfPreview_(false /*isPdfPreview*/); |
+ e.preventDefault(); |
+ } |
return; |
} |