Chromium Code Reviews| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
| index 05b2009312576a97e48bd8d84413efacd2c26fbd..4c04953b4c4de4423ef5c1fad28d83138dc4043f 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
| @@ -119,8 +119,7 @@ Background = function() { |
| cvox.ExtensionBridge.addMessageListener(this.onMessage_); |
| - document.addEventListener( |
| - 'keydown', cvox.ChromeVoxKbHandler.basicKeyDownActionsListener, true); |
| + document.addEventListener('keydown', this.onKeyDown.bind(this), true); |
| cvox.ChromeVoxKbHandler.commandHandler = this.onGotCommand.bind(this); |
| // Classic keymap. |
| @@ -413,6 +412,18 @@ Background.prototype = { |
| }, |
| /** |
| + * Handles key down events. |
| + * @param {Event} evt The key down event to process. |
| + * @return {boolean} True if the default action should be performed. |
| + */ |
| + onKeyDown: function(evt) { |
| + if (!cvox.ChromeVoxKbHandler.basicKeyDownActionsListener(evt)) { |
|
David Tseng
2015/11/19 01:11:50
Sorry missed something here. This needs to be mode
|
| + evt.preventDefault(); |
| + evt.stopPropagation(); |
| + } |
| + }, |
| + |
| + /** |
| * Open the options page in a new tab. |
| */ |
| showOptionsPage: function() { |