mirror of
https://github.com/zotero/zotero.git
synced 2026-10-03 02:21:49 +00:00
Reopen closed reader and note tabs at their original position
The undo-close hooks read the index from the wrong object, so reopened reader and note tabs were always appended at the end.
This commit is contained in:
parent
4d94810def
commit
b3b6e7f33d
1 changed files with 4 additions and 4 deletions
|
|
@ -202,12 +202,12 @@ var Zotero_Tabs = new function () {
|
|||
}
|
||||
},
|
||||
undoClose: {
|
||||
reader: async (tab, _tabIndex) => {
|
||||
reader: async (tab, tabIndex) => {
|
||||
if (Zotero.Items.exists(tab.data.itemID)) {
|
||||
await Zotero.Reader.open(tab.data.itemID,
|
||||
null,
|
||||
{
|
||||
tabIndex: tab.index,
|
||||
tabIndex,
|
||||
openInBackground: true,
|
||||
allowDuplicate: true
|
||||
}
|
||||
|
|
@ -216,12 +216,12 @@ var Zotero_Tabs = new function () {
|
|||
}
|
||||
return false;
|
||||
},
|
||||
note: async (tab, _tabIndex) => {
|
||||
note: async (tab, tabIndex) => {
|
||||
if (Zotero.Items.exists(tab.data.itemID)) {
|
||||
await Zotero.Notes.open(tab.data.itemID,
|
||||
null,
|
||||
{
|
||||
tabIndex: tab.index,
|
||||
tabIndex,
|
||||
openInBackground: true,
|
||||
allowDuplicate: true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue