diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 006d9317fa..9335725c1f 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -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; }