Commit ae59c0b9 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Make commands to open the ChromeVox Panel a toggle

Bug: 869898
Change-Id: I66d0ac277e0b78ea40b1eff277fbdda61bdee0fb
Reviewed-on: https://chromium-review.googlesource.com/1176423Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583461}
parent f338125d
...@@ -270,6 +270,12 @@ Panel.setMode = function(mode) { ...@@ -270,6 +270,12 @@ Panel.setMode = function(mode) {
* @param {*=} opt_activateMenuTitle Title msg id of menu to open. * @param {*=} opt_activateMenuTitle Title msg id of menu to open.
*/ */
Panel.onOpenMenus = function(opt_event, opt_activateMenuTitle) { Panel.onOpenMenus = function(opt_event, opt_activateMenuTitle) {
// If the menu was already open, close it now and exit early.
if (Panel.mode_ != Panel.Mode.COLLAPSED) {
Panel.setMode(Panel.Mode.COLLAPSED);
return;
}
// Eat the event so that a mousedown isn't turned into a drag, allowing // Eat the event so that a mousedown isn't turned into a drag, allowing
// users to click-drag-release to select a menu item. // users to click-drag-release to select a menu item.
if (opt_event) { if (opt_event) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment