Commit 35e044ad authored by smckay's avatar smckay Committed by Commit bot

Hide details panel when ESC is pressed.

BUG=460990
TEST=None

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

Cr-Commit-Position: refs/heads/master@{#317764}
parent e6d374cf
...@@ -491,6 +491,20 @@ importer.RuntimeCommandWidget = function() { ...@@ -491,6 +491,20 @@ importer.RuntimeCommandWidget = function() {
/** @private {function(!importer.ClickSource)} */ /** @private {function(!importer.ClickSource)} */
this.clickListener_; this.clickListener_;
document.addEventListener('keydown', this.onKeyDown_.bind(this));
};
/**
* Handle document scoped key-down events.
* @param {Event} event Key event.
* @private
*/
importer.RuntimeCommandWidget.prototype.onKeyDown_ = function(event) {
switch (util.getKeyModifiers(event) + event.keyIdentifier) {
case 'U+001B':
this.setDetailsVisible_(false);
}
}; };
/** /**
......
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