diff --git a/chrome/content/zotero/components/windowed-list.js b/chrome/content/zotero/components/windowed-list.js index cd264e6851..7b36dbf251 100644 --- a/chrome/content/zotero/components/windowed-list.js +++ b/chrome/content/zotero/components/windowed-list.js @@ -63,6 +63,7 @@ module.exports = class { this.scrollDirection = 0; this.scrollOffset = 0; this.overscanCount = 2; + this._invalidating = false; this._lastItemCount = null; this._rowOffsets = [[0, 0]]; @@ -113,6 +114,8 @@ module.exports = class { * Rerender items within the scrollbox. Call sparingly */ invalidate() { + if (this._invalidating) return; + this._invalidating = true; // Removes any items out of view and adds the ones not in view let oldRenderedRows = new Set(this._renderedRows.keys()); this.render(); @@ -122,6 +125,7 @@ module.exports = class { if (!oldRenderedRows.has(index)) continue; this.rerenderItem(index); } + this._invalidating = false; } /** diff --git a/scss/components/_virtualized-table.scss b/scss/components/_virtualized-table.scss index c7d8521533..17b4cf0800 100644 --- a/scss/components/_virtualized-table.scss +++ b/scss/components/_virtualized-table.scss @@ -60,12 +60,6 @@ padding-inline-end: 4px; } - &:first-child { - --extra-width: var(--first-column-extra-width, 0px); - // No padding on the first cell since it's done via twisty and indent - padding-inline-start: 0; - } - &:first-child, &.primary { display: flex; @@ -522,3 +516,10 @@ } } +.virtualized-tree { + .cell:first-child { + --extra-width: var(--first-column-extra-width, 0px); + // No padding on the first cell since it's done via twisty and indent + padding-inline-start: 0; + } +} \ No newline at end of file