mirror of
https://github.com/zotero/zotero.git
synced 2026-09-19 00:01:31 +00:00
Fix focusContextPane error when pressing tab in standalone PDF window
Fixes #2823
This commit is contained in:
parent
500f187a60
commit
7cd57cd9e4
1 changed files with 7 additions and 8 deletions
|
|
@ -1071,18 +1071,17 @@ class ReaderInstance {
|
|||
return;
|
||||
}
|
||||
case 'focusSplitButton': {
|
||||
let win = Zotero.getMainWindow();
|
||||
if (win) {
|
||||
win.document.getElementById('zotero-tb-toggle-item-pane').focus();
|
||||
if (this instanceof ReaderTab) {
|
||||
let win = Zotero.getMainWindow();
|
||||
if (win) {
|
||||
win.document.getElementById('zotero-tb-toggle-item-pane').focus();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
case 'focusContextPane': {
|
||||
let win = Zotero.getMainWindow();
|
||||
if (win) {
|
||||
if (!this._window.ZoteroContextPane.focus()) {
|
||||
this.focusFirst();
|
||||
}
|
||||
if (this instanceof ReaderWindow || !this._window.ZoteroContextPane.focus()) {
|
||||
this.focusFirst();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue