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

Unified Diff: ui/webui/resources/js/cr/ui/bubble.js

Issue 604373006: Compile chrome://settings, part 9: yet another final battle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@K_blockers_from_bookmarks
Patch Set: dbeam@'s review Created 6 years, 3 months 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
Index: ui/webui/resources/js/cr/ui/bubble.js
diff --git a/ui/webui/resources/js/cr/ui/bubble.js b/ui/webui/resources/js/cr/ui/bubble.js
index 95318a4f1f2808a2ae330bc6a1087915b41cfe06..36ffb59d33ec4f923cc708803d090a73d10d91c4 100644
--- a/ui/webui/resources/js/cr/ui/bubble.js
+++ b/ui/webui/resources/js/cr/ui/bubble.js
@@ -477,6 +477,8 @@ cr.define('cr.ui', function() {
* outside the bubble and its target element, scrolls the underlying
* document or resizes the window.
* @param {Event} event The event.
+ * @suppress {checkTypes}
+ * TODO(vitalyp): remove the suppression.
*/
handleEvent: function(event) {
BubbleBase.prototype.handleEvent.call(this, event);
@@ -486,14 +488,15 @@ cr.define('cr.ui', function() {
// left-click on the bubble's target element (allowing the target to
// handle the event and close the bubble itself).
case 'mousedown':
- if (event.button == 0 &&
- this.anchorNode_.contains(assertInstanceof(event.target, Node))) {
+ var target = assertInstanceof(event.target, Node);
+ if (event.button == 0 && this.anchorNode_.contains(target)) {
Dan Beam 2014/10/02 02:54:38 nit: no curlies
Vitaly Pavlenko 2014/10/02 18:18:22 Done.
break;
}
// Close the bubble when the underlying document is scrolled.
case 'mousewheel':
case 'scroll':
- if (this.contains(assertInstanceof(event.target, Node)))
+ var target = assertInstanceof(event.target, Node);
+ if (this.contains(target))
break;
// Close the bubble when the window is resized.
case 'resize':

Powered by Google App Engine
This is Rietveld 408576698