Fix Redo via Cmd-Shift-Z in notes on OS X

This commit is contained in:
Dan Stillman 2014-04-29 17:11:07 -04:00
parent 8d807b73c6
commit 5913e6780e

View file

@ -125,6 +125,18 @@
this._eventHandler = function (event) {
//Zotero.debug(event.type);
switch (event.type) {
case 'keydown':
// Intercept and manually trigger redo for Cmd-Shift-Z,
// which keeps it from toggling the Zotero pane instead
if (Zotero.isMac && event.metaKey && event.shiftKey && !event.ctrlKey
&& !event.altKey && event.keyCode == 90) {
event.stopPropagation();
event.preventDefault();
self.redo();
return;
}
break;
case 'keypress':
// Ignore keypresses that don't change
// any text
@ -336,6 +348,14 @@
</body>
</method>
<method name="redo">
<body>
<![CDATA[
this._editor.undoManager.redo();
]]>
</body>
</method>
<method name="clearUndo">
<body>
<![CDATA[