Index: chrome/browser/resources/print_preview/print_preview.js |
=================================================================== |
--- chrome/browser/resources/print_preview/print_preview.js (revision 147897) |
+++ chrome/browser/resources/print_preview/print_preview.js (working copy) |
@@ -651,6 +651,14 @@ |
} |
} |
+ if (e.keyCode == 13 /*enter*/ && 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(); |
+ return; |
+ } |
+ |
// Pass certain directional keyboard events to the PDF viewer. |
this.previewArea_.handleDirectionalKeyEvent(e); |
}, |