summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/shared
diff options
context:
space:
mode:
authorarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 02:08:07 +0000
committerarv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 02:08:07 +0000
commit00a0072b16d490fcd0c2875d8ac522011525453e (patch)
tree685407eed62323b1c5788f8038d8b957fd240124 /chrome/browser/resources/shared
parent51a01c3dc1e229634c7a4e205240ce6cce031a06 (diff)
downloadchromium_src-00a0072b16d490fcd0c2875d8ac522011525453e.zip
chromium_src-00a0072b16d490fcd0c2875d8ac522011525453e.tar.gz
chromium_src-00a0072b16d490fcd0c2875d8ac522011525453e.tar.bz2
Bookmark Manager: Handle multiple right clicks correctly.
BUG=52291 TEST=Go to bookmark manager. Right click a bookmark. Right click another bookmark. This should open a new context menu Right click "Edit...". This should start editing the item. Review URL: http://codereview.chromium.org/3395006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/shared')
-rw-r--r--chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
index 50eb64a..e3e2fd5 100644
--- a/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
+++ b/chrome/browser/resources/shared/js/cr/ui/context_menu_handler.js
@@ -5,6 +5,7 @@
cr.define('cr.ui', function() {
const positionPopupAtPoint = cr.ui.positionPopupAtPoint;
+ const Menu = cr.ui.Menu;
/**
* Handles context menus.
@@ -39,6 +40,7 @@ cr.define('cr.ui', function() {
doc.addEventListener('mousedown', this, true);
doc.addEventListener('blur', this, true);
doc.defaultView.addEventListener('resize', this);
+ menu.addEventListener('contextmenu', this);
menu.addEventListener('activate', this);
this.positionMenu_(e, menu);
},
@@ -57,6 +59,7 @@ cr.define('cr.ui', function() {
doc.removeEventListener('mousedown', this, true);
doc.removeEventListener('blur', this, true);
doc.defaultView.removeEventListener('resize', this);
+ menu.removeEventListener('contextmenu', this);
menu.removeEventListener('activate', this);
menu.selectedIndex = -1;
this.menu_ = null;
@@ -64,7 +67,7 @@ cr.define('cr.ui', function() {
// On windows we might hide the menu in a right mouse button up and if
// that is the case we wait some short period before we allow the menu
// to be shown again.
- this.hideTimestamp_ = Date.now();
+ this.hideTimestamp_ = cr.isWindows ? Date.now() : 0;
},
/**