Index: ui/webui/resources/js/cr/ui/menu_button.js |
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js |
index 90ee502b0c3e5b1253c17582de6d04118b0be38b..8e27b8af40ba8b55c84600664f72bf3b2e438930 100644 |
--- a/ui/webui/resources/js/cr/ui/menu_button.js |
+++ b/ui/webui/resources/js/cr/ui/menu_button.js |
@@ -98,7 +98,7 @@ cr.define('cr.ui', function() { |
switch (e.type) { |
case 'mousedown': |
if (e.currentTarget == this.ownerDocument) { |
- if (e.target instanceof Element && !this.contains(e.target) && |
+ if (e.target instanceof Node && !this.contains(e.target) && |
!this.menu.contains(e.target)) { |
this.hideMenu(); |
} else { |
@@ -133,7 +133,7 @@ cr.define('cr.ui', function() { |
this.classList.remove('using-mouse'); |
break; |
case 'focus': |
- if (e.target instanceof Element && !this.contains(e.target) && |
+ if (e.target instanceof Node && !this.contains(e.target) && |
!this.menu.contains(e.target)) { |
this.hideMenu(); |
// Show the focus ring on focus - if it's come from a mouse event, |