summaryrefslogtreecommitdiffstats
path: root/ui/webui
diff options
context:
space:
mode:
authormtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 07:09:50 +0000
committermtomasz@chromium.org <mtomasz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 07:09:50 +0000
commitf09261c3dd64048eb47e71bab18be020948ec904 (patch)
tree126ce3caea46b5c15e74b3ec5b773c6bb8c449b1 /ui/webui
parentfb17ddce23359fd07b5591a86ad40343ec0b1975 (diff)
downloadchromium_src-f09261c3dd64048eb47e71bab18be020948ec904.zip
chromium_src-f09261c3dd64048eb47e71bab18be020948ec904.tar.gz
chromium_src-f09261c3dd64048eb47e71bab18be020948ec904.tar.bz2
Update commands when showing a popup menu attached to a button.
Before, the commands were updated for context menus, but not for button menus. Therefore, some commands were not up to date, eg. they were disabled, while they shouldn't. This patch calls menu.updateCommands() every time we show a menu. TEST=Follow the bug repro steps. BUG=174570 Review URL: https://chromiumcodereview.appspot.com/12208041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/webui')
-rw-r--r--ui/webui/resources/js/cr/ui/menu_button.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/webui/resources/js/cr/ui/menu_button.js b/ui/webui/resources/js/cr/ui/menu_button.js
index 54b77df..4514133 100644
--- a/ui/webui/resources/js/cr/ui/menu_button.js
+++ b/ui/webui/resources/js/cr/ui/menu_button.js
@@ -146,6 +146,8 @@ cr.define('cr.ui', function() {
showMenu: function(shouldSetFocus) {
this.hideMenu();
+ this.menu.updateCommands(this);
+
var event = document.createEvent('UIEvents');
event.initUIEvent('menushow', true, true, window, null);