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

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

Issue 682393002: history/settings/extensions/help: focus current frame on mousedown if necessary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arv@ review Created 6 years, 2 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
« no previous file with comments | « chrome/browser/resources/uber/uber_utils.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/resources/uber/uber_utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698