From f09261c3dd64048eb47e71bab18be020948ec904 Mon Sep 17 00:00:00 2001 From: "mtomasz@chromium.org" Date: Thu, 7 Feb 2013 07:09:50 +0000 Subject: 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 --- ui/webui/resources/js/cr/ui/menu_button.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui') 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); -- cgit v1.1