Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Unified Diff: chrome/browser/resources/shared/js/cr/ui/bubble.js

Issue 8565014: NTP4: Remove native focus emulation for bubbles when explictly told to. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review comments from estade@ Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
},
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698