| Index: chrome/browser/resources/chromeos/login/bubble.js
|
| ===================================================================
|
| --- chrome/browser/resources/chromeos/login/bubble.js (revision 95551)
|
| +++ chrome/browser/resources/chromeos/login/bubble.js (working copy)
|
| @@ -24,7 +24,9 @@
|
| /** @inheritDoc */
|
| decorate: function() {
|
| this.ownerDocument.addEventListener('click',
|
| - this.handleClick_.bind(this));
|
| + this.handleDocClick_.bind(this));
|
| + this.ownerDocument.addEventListener('keydown',
|
| + this.handleDocKeyDown_.bind(this));
|
| this.addEventListener('webkitTransitionEnd',
|
| this.handleTransitionEnd_.bind(this));
|
| },
|
| @@ -84,16 +86,25 @@
|
| },
|
|
|
| /**
|
| - * Handler of click event.
|
| + * Handler of document click event.
|
| * @private
|
| */
|
| - handleClick_: function(e) {
|
| + handleDocClick_: function(e) {
|
| // Ignore clicks on anchor element.
|
| if (e.target == this.anchor_)
|
| return;
|
|
|
| if (!this.hidden)
|
| this.hide();
|
| + },
|
| +
|
| + /**
|
| + * Handle of document keydown event.
|
| + * @private
|
| + */
|
| + handleDocKeyDown_: function(e) {
|
| + if (!this.hidden)
|
| + this.hide();
|
| }
|
| };
|
|
|
|
|