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

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

Issue 555733003: [Mac] Chrome print dialog disregards system cancel key-command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | 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
diff --git a/chrome/browser/resources/print_preview/print_preview.js b/chrome/browser/resources/print_preview/print_preview.js
index 3d52bee54ca6b55a7e79abe1b0d4a8ece08cfead..79d7f620e7e92de904146f72fddd765e96787094 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -855,6 +855,13 @@ cr.define('print_preview', function() {
return;
}
+ // On Mac, Cmd- should close the print dialog.
+ if (cr.isMac && e.keyCode == 189 && e.metaKey) {
+ this.close_();
+ e.preventDefault();
+ return;
+ }
+
// Ctrl + Shift + p / Mac equivalent.
if (e.keyCode == 80) {
if ((cr.isMac && e.metaKey && e.altKey && !e.shiftKey && !e.ctrlKey) ||
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698