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

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

Issue 10446076: Handle Escape key on constrained window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 6 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
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 6b417bfbdab6729bfd040460d5eab8761c93d5f2..66dbe1899f65f5d16ab37e7a05a4a6dfd621695f 100644
--- a/chrome/browser/resources/print_preview/print_preview.js
+++ b/chrome/browser/resources/print_preview/print_preview.js
@@ -625,6 +625,9 @@ cr.define('print_preview', function() {
*/
onKeyDown_: function(e) {
// Escape key closes the dialog.
+ // <if expr="not pp_ifdef('toolkit_views')">
+ // On the toolkit_views environment, ESC key is handled by C++-side
+ // instead of JS-side.
if (e.keyCode == 27 && !e.shiftKey && !e.ctrlKey && !e.altKey &&
!e.metaKey) {
if (this.destinationSearch_.getIsVisible()) {
@@ -637,6 +640,7 @@ cr.define('print_preview', function() {
e.preventDefault();
return;
}
+ // </if>
// Ctrl + Shift + p / Mac equivalent.
if (e.keyCode == 80) {
« no previous file with comments | « chrome/browser/resources/certificate_viewer.js ('k') | chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698