Fix #1260, Windows Application (menu) key doesn't work in items pane
This commit is contained in:
parent
2d8132b6c8
commit
df24917c2f
2 changed files with 13 additions and 14 deletions
|
@ -2666,6 +2666,18 @@ var ZoteroPane = new function()
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Show context menu once it's ready
|
||||
*/
|
||||
this.onItemsContextMenuOpen = function (event) {
|
||||
ZoteroPane.buildItemContextMenu()
|
||||
.then(function () {
|
||||
document.getElementById('zotero-itemmenu').openPopup(
|
||||
null, null, event.clientX + 1, event.clientY + 1, true, false, event
|
||||
);
|
||||
})
|
||||
};
|
||||
|
||||
this.buildItemContextMenu = Zotero.Promise.coroutine(function* () {
|
||||
var options = [
|
||||
'showInLibrary',
|
||||
|
@ -3011,20 +3023,6 @@ var ZoteroPane = new function()
|
|||
}
|
||||
}
|
||||
else if (tree.id == 'zotero-items-tree') {
|
||||
// Show context menu once it's ready
|
||||
if (event.button == 2) {
|
||||
// Allow item to be selected first
|
||||
setTimeout(function () {
|
||||
ZoteroPane_Local.buildItemContextMenu()
|
||||
.then(function () {
|
||||
document.getElementById('zotero-itemmenu').openPopup(
|
||||
null, null, event.clientX + 1, event.clientY + 1, true, false, event
|
||||
);
|
||||
})
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let collectionTreeRow = ZoteroPane_Local.getCollectionTreeRow();
|
||||
|
||||
// Automatically select all equivalent items when clicking on an item
|
||||
|
|
|
@ -375,6 +375,7 @@
|
|||
onkeydown="ZoteroPane_Local.handleKeyDown(event, this.id)"
|
||||
onselect="ZoteroPane_Local.itemSelected(event)"
|
||||
oncommand="ZoteroPane_Local.serializePersist()"
|
||||
oncontextmenu="ZoteroPane.onItemsContextMenuOpen(event)"
|
||||
flex="1"
|
||||
hidden="true"
|
||||
zotero-persist="current-view-group">
|
||||
|
|
Loading…
Add table
Reference in a new issue