diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index b639a64a20..d4930720e8 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -1324,11 +1324,7 @@ class VirtualizedTable extends React.Component { const jsWindow = document.querySelector(`#${this._jsWindowID} .windowed-list`); if (!jsWindow) return; const header = document.querySelector(`#${this.props.id} .virtualized-table-header`); - const scrollbarWidth = Zotero.Utilities.Internal.getScrollbarWidth(); - let paddingWidth = 0; - if (Zotero.isLinux) { - paddingWidth = 2; // from the border - } + const scrollbarWidth = jsWindow.parentElement.getBoundingClientRect().width - jsWindow.parentElement.clientWidth; header.style.setProperty('--scrollbar-width', `${scrollbarWidth}px`); }