Index: ui/webui/resources/js/cr/ui/command.js |
diff --git a/ui/webui/resources/js/cr/ui/command.js b/ui/webui/resources/js/cr/ui/command.js |
index 302219cdf74ea181f6814a8e2e3f4ecf19282dca..494dc2eacda359611b99c9008a2ab6ffc6562147 100644 |
--- a/ui/webui/resources/js/cr/ui/command.js |
+++ b/ui/webui/resources/js/cr/ui/command.js |
@@ -241,7 +241,7 @@ cr.define('cr.ui', function() { |
var target = e.target; |
// Ignore focus on a menu button or command item |
- if (target.menu || target.command) |
+ if ('menu' in target || 'command' in target) |
arv (Not doing code reviews)
2014/09/29 22:46:27
Why is this needed? This is bad for performance an
Dan Beam
2014/09/29 23:00:15
i wouldn't say the original code is optimal either
Vitaly Pavlenko
2014/09/30 03:52:02
I'm going to try instanceof approach on try bots.
|
return; |
var commands = Array.prototype.slice.call( |