| Index: ui/login/bubble.js
|
| diff --git a/ui/login/bubble.js b/ui/login/bubble.js
|
| index e31125a453b69a632b14dea1d18b81544131cc12..945cd4e1137f6494ec59532e7e3f82d1bb790b72 100644
|
| --- a/ui/login/bubble.js
|
| +++ b/ui/login/bubble.js
|
| @@ -19,11 +19,11 @@ cr.define('cr.ui', function() {
|
| * Bubble key codes.
|
| * @enum {number}
|
| */
|
| - var KeyCodes = {
|
| - TAB: 'U+0009',
|
| + var Keys = {
|
| + TAB: 'Tab',
|
| ENTER: 'Enter',
|
| - ESC: 'U+001B',
|
| - SPACE: 'U+0020'
|
| + ESC: 'Escape',
|
| + SPACE: ' '
|
| };
|
|
|
| /**
|
| @@ -327,20 +327,20 @@ cr.define('cr.ui', function() {
|
| }
|
| // Artificial tab-cycle.
|
|
|
| - if (e.keyIdentifier == KeyCodes.TAB && e.shiftKey == true &&
|
| + if (e.key == Keys.TAB && e.shiftKey == true &&
|
| e.target == this.firstBubbleElement_) {
|
| this.lastBubbleElement_.focus();
|
| e.preventDefault();
|
| }
|
| - if (e.keyIdentifier == KeyCodes.TAB && e.shiftKey == false &&
|
| + if (e.key == Keys.TAB && e.shiftKey == false &&
|
| e.target == this.lastBubbleElement_) {
|
| this.firstBubbleElement_.focus();
|
| e.preventDefault();
|
| }
|
| // Close bubble on ESC or on hitting spacebar or Enter at close-button.
|
| - if (e.keyIdentifier == KeyCodes.ESC ||
|
| - ((e.keyIdentifier == KeyCodes.ENTER ||
|
| - e.keyIdentifier == KeyCodes.SPACE) &&
|
| + if (e.key == Keys.ESC ||
|
| + ((e.key == Keys.ENTER ||
|
| + e.key == Keys.SPACE) &&
|
| e.target && e.target.classList.contains('close-button')))
|
| this.hide();
|
| },
|
|
|