From 7b4c4e528c5ea1327e9098d4229f8e1b30eb054b Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 19 May 2022 14:08:11 +0300 Subject: [PATCH] fx-compat: Fix context pane: - Stacked view. - Item pane tabs. - Note list search box. --- chrome/content/zotero/contextPane.js | 10 ++++------ chrome/skin/default/zotero/contextPane.css | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/contextPane.js b/chrome/content/zotero/contextPane.js index ce4d910564..00883a0c25 100644 --- a/chrome/content/zotero/contextPane.js +++ b/chrome/content/zotero/contextPane.js @@ -366,7 +366,7 @@ var ZoteroContextPane = new function () { var height = 0; if (Zotero.Prefs.get('layout') == 'stacked' && _contextPane.getAttribute('collapsed') != 'true') { - height = _contextPaneInner.boxObject.height; + height = _contextPaneInner.getBoundingClientRect().height; } Zotero.Reader.setBottomPlaceholderHeight(height); } @@ -475,9 +475,8 @@ var ZoteroContextPane = new function () { var vbox = document.createXULElement('vbox'); vbox.style.flex = '1'; - var input = document.createXULElement('textbox'); - input.style.width = 'calc(100% - 42px)'; - input.style.marginLeft = '12px'; + var input = document.createXULElement('search-textbox'); + input.style.margin = '4px 7px'; input.setAttribute('type', 'search'); input.setAttribute('timeout', '250'); input.addEventListener('command', () => { @@ -831,8 +830,6 @@ var ZoteroContextPane = new function () { _updateAddToNote(); }); - tabbox.append(tabs, tabpanels); - // Info tab var tabInfo = document.createXULElement('tab'); tabInfo.setAttribute('label', Zotero.Intl.strings['zotero.tabs.info.label']); @@ -844,6 +841,7 @@ var ZoteroContextPane = new function () { tabRelated.setAttribute('label', Zotero.Intl.strings['zotero.tabs.related.label']); tabs.append(tabInfo, tabTags, tabRelated); + tabbox.append(tabs, tabpanels); // Info panel var panelInfo = document.createXULElement('tabpanel'); diff --git a/chrome/skin/default/zotero/contextPane.css b/chrome/skin/default/zotero/contextPane.css index 623425265e..667c75e7d5 100644 --- a/chrome/skin/default/zotero/contextPane.css +++ b/chrome/skin/default/zotero/contextPane.css @@ -3,6 +3,7 @@ } #zotero-context-pane { + display: flex; min-width: 360px; }