Index: chrome/browser/resources/shared/js/cr/ui/bubble.js |
diff --git a/chrome/browser/resources/shared/js/cr/ui/bubble.js b/chrome/browser/resources/shared/js/cr/ui/bubble.js |
index f26b8bd8851338909829f2a57fb8aa6c6b2076be..7e98b55d2c52532b1e0b0aca3df0606b5c95c037 100644 |
--- a/chrome/browser/resources/shared/js/cr/ui/bubble.js |
+++ b/chrome/browser/resources/shared/js/cr/ui/bubble.js |
@@ -173,8 +173,8 @@ cr.define('cr.ui', function() { |
}, |
/** |
- * Starts showing the bubble. The bubble will grab input and show until the |
- * user clicks away. |
+ * Starts showing the bubble. The bubble will show until the user clicks |
+ * away or presses Escape. |
*/ |
show: function() { |
if (!this.hidden) |
@@ -209,12 +209,12 @@ cr.define('cr.ui', function() { |
*/ |
handleEvent: function(e) { |
switch (e.type) { |
- case 'keydown': |
+ case 'keydown': { |
if (e.keyCode == 27) // Esc |
this.hide(); |
break; |
- |
- case 'mousedown': |
+ } |
+ case 'mousedown': { |
if (e.target == this.querySelector('.bubble-close')) { |
this.handleCloseEvent_(); |
} else if (!this.contains(e.target)) { |
@@ -225,11 +225,8 @@ cr.define('cr.ui', function() { |
return; |
} |
break; |
+ } |
} |
- |
- e.stopPropagation(); |
- e.preventDefault(); |
- return; |
}, |
}; |