summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorsschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 05:35:36 +0000
committersschmitz@chromium.org <sschmitz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 05:35:36 +0000
commit101b87863ae5e1500edcf817d85329846f0d1493 (patch)
treef176a793db0df860821307b779ec30bf491cf55a /ui
parent1a4cb9dc7e1d04805e3319dbac80d97650f11a41 (diff)
downloadchromium_src-101b87863ae5e1500edcf817d85329846f0d1493.zip
chromium_src-101b87863ae5e1500edcf817d85329846f0d1493.tar.gz
chromium_src-101b87863ae5e1500edcf817d85329846f0d1493.tar.bz2
Reverting fix for crbug.com/138309 which caused this problem (Filed bug crbug.com/168910 to re-fix 138309 differently).
The fix for crbug.com/138309 dismisses context menus on ChromeOS when Ctrl or Alt is pressed. This prevents context menus that allow for Ctrl clicks to work (because they are closed prematurely). The problem that the fix for 138309 tried to address is that "tab navigation" short-cuts work but leave context menus up. These types of shortcuts should either be blocked or dismiss the context menu. For more info see: crbug.com/167539 (this bug) crbug.com/139308 (bug fix being reverted) crbug.com/168910 (replica of 139308) BUG=167539 TEST=manual: Create bookmark folder with entries Click on bookmark folder Control Click on an entry Review URL: https://chromiumcodereview.appspot.com/11826012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/controls/menu/menu_controller.cc23
1 files changed, 1 insertions, 22 deletions
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
index 0fe8fbb..2d433ed 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -941,33 +941,12 @@ bool MenuController::Dispatch(const base::NativeEvent& event) {
aura::Env::GetInstance()->GetDispatcher()->Dispatch(event);
return false;
}
- // We exit the menu and its message loop on control and alt keypress.
- // So that accelerators such as control-n don't run with a nested
- // message loop we exit on any modifier that might be used for an
- // accelerator.
- // If the user presses control-n, the menu disappears already when
- // the control key is down. When "n" (while control is still down)
- // is pressed the shortcut is handled normally after the nested loop
- // has ended and the context menu has disappeared.
- // We don't exit the menu on the release of modifiers as the menu
- // may have been shown by way of an accelerator, eg alt-f. So that
- // if we exited menus on the release of modifiers the menu would
- // first appear and then immediately disappear.
- const ui::EventType event_type = ui::EventTypeFromNative(event);
- if (event_type == ui::ET_KEY_PRESSED ) {
- const ui::KeyboardCode key_code = ui::KeyboardCodeFromNative(event);
- if (key_code == ui::VKEY_LCONTROL || key_code == ui::VKEY_CONTROL ||
- key_code == ui::VKEY_RCONTROL || key_code == ui::VKEY_MENU ) {
- Cancel(EXIT_ALL);
- return false;
- }
- }
// Activates mnemonics only when it it pressed without modifiers except for
// caps and shift.
int flags = ui::EventFlagsFromNative(event) &
~ui::EF_CAPS_LOCK_DOWN & ~ui::EF_SHIFT_DOWN;
if (flags == ui::EF_NONE) {
- switch (event_type) {
+ switch (ui::EventTypeFromNative(event)) {
case ui::ET_KEY_PRESSED:
if (!OnKeyDown(ui::KeyboardCodeFromNative(event)))
return false;