diff --git a/chrome/content/zotero/tabs.js b/chrome/content/zotero/tabs.js index e2a5a2aeae..0167f20fa0 100644 --- a/chrome/content/zotero/tabs.js +++ b/chrome/content/zotero/tabs.js @@ -988,7 +988,6 @@ var Zotero_Tabs = new function () { let menuFilter = document.getElementById('zotero-tabs-menu-filter'); menuFilter.value = ""; this._tabsMenuFilter = ""; - this.refreshTabsMenuList(); }; this.handleTabsMenuShown = function (_) { diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index f3266c95cc..8ba99fc7f3 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -446,8 +446,9 @@ var ZoteroPane = new function() // When a panel popup hides, refocus the previous element // When a menupopup hides, stop hiding the focus-ring - document.addEventListener("popuphiding", e => { - if (e.target.tagName == "panel") { + document.addEventListener("popuphiding", (e) => { + if (e.target.tagName == "panel" + && document.activeElement && e.target.contains(document.activeElement)) { ZoteroPane.lastFocusedElement.focus(); } let noFocus = [...document.querySelectorAll(".hidden-focus")];