Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 10796094: Merge 147143 - Makes dialog print on ENTER key press. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/print_preview/print_header.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
},
« no previous file with comments | « chrome/browser/resources/print_preview/print_header.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698