summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/resources/options/options_page.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/resources/options/options_page.js b/chrome/browser/resources/options/options_page.js
index aa69415..f0c750e 100644
--- a/chrome/browser/resources/options/options_page.js
+++ b/chrome/browser/resources/options/options_page.js
@@ -241,11 +241,16 @@ cr.define('options', function() {
// Set up the overlay sheet. Clicks on the visible part of the parent page
// should close the overlay, not fall through to the parent page.
var self = this;
- $('subpage-sheet-container').onclick = function(event) {
+ var subpageContainer = $('subpage-sheet-container');
+ subpageContainer.onclick = function(event) {
if (!$('subpage-sheet').contains(event.target))
self.closeSubPage();
event.stopPropagation();
}
+ subpageContainer.onkeydown = function(e) {
+ if (e.keyCode == 27) // Esc
+ self.closeSubPage();
+ };
};
/**