Commit 4b0e06fa authored by gajendra.n's avatar gajendra.n Committed by Commit bot

[Mac] Chrome print dialog disregards system cancel key-command.

Add support for Cmd- (the universal "cancel" shortcut on Mac) to close print dialog.

BUG=249786
R=dpapad@chromium.org

TEST=
1. Open a web page
2. Hit Cmd-P to bring up print dialog.
3. Hit Cmd- and observe.
4. The print dialog should get closed.

Review URL: https://codereview.chromium.org/555733003

Cr-Commit-Position: refs/heads/master@{#294142}
parent 903e26ee
......@@ -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) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment