www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 1217a5409e47aa5f8b685e4f343f1cfd7ca523a2
parent 65488b56b640d7aacf68eca5a7f33df1c33b0b9d
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 12 Mar 2013 02:13:35 -0400

Fix Control (and Alt) key shortcuts in items pane on Windows

Follow-up to d2f028d and 0a7cc4448

Diffstat:
Mchrome/content/zotero/xpcom/itemTreeView.js | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js @@ -170,6 +170,8 @@ Zotero.ItemTreeView.prototype._setTreeGenerator = function(treebox) return; } + event.preventDefault(); + Q.fcall(function () { var key = String.fromCharCode(event.which); if (key == '+' && !(event.ctrlKey || event.altKey || event.metaKey)) { @@ -215,13 +217,16 @@ Zotero.ItemTreeView.prototype._setTreeGenerator = function(treebox) tree.disableKeyNavigation = false; self._skipKeyPress = true; - var nsIDWU = Components.interfaces.nsIDOMWindowUtils + var nsIDWU = Components.interfaces.nsIDOMWindowUtils; var domWindowUtils = event.originalTarget.ownerDocument.defaultView .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(nsIDWU); var modifiers = 0; + if (event.altKey) { + modifiers |= nsIDWU.MODIFIER_ALT; + } if (event.ctrlKey) { - modifiers |= nsIDWU.MODIFIER_CTRL; + modifiers |= nsIDWU.MODIFIER_CONTROL; } if (event.shiftKey) { modifiers |= nsIDWU.MODIFIER_SHIFT;