Fix focusContextPane
error when pressing tab in standalone PDF window
Fixes #2823
This commit is contained in:
parent
b96fcd41b1
commit
0d09618865
1 changed files with 7 additions and 8 deletions
|
@ -1065,18 +1065,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