From c30163ed907bd17dd1ed66cc63eaaccad6471e5b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 16 Sep 2026 15:38:34 -0400 Subject: [PATCH] Fix row contents shifting when showing a between-rows drop indicator The drop indicator span was inserted before the cells, so the first cell stopped matching :first-child and picked up inline-start padding. Insert it after the cells instead. Regression from 5ca1fbb167, which replaced the .first-column class with :first-child. --- chrome/content/zotero/itemTree.jsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 748372ace1..4bbe9be9e6 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -2250,6 +2250,17 @@ var ItemTree = class ItemTree extends LibraryTree { div.classList.remove('tight'); } + let { firstColumn } = columns.reduce((acc, column) => { + return !column.hidden && column.ordinal < acc.lowestOrdinal + ? { lowestOrdinal: column.ordinal, firstColumn: column } + : acc; + }, { lowestOrdinal: Infinity, firstColumn: null }); + + this._renderCtx.firstColumn = firstColumn; + this._renderCtx.includeTrashed = this.rowProvider.includeTrashed; + + row.renderRow(div, index, columns, rowData, this._renderCtx); + if (this._dropRow == index) { let span; if (Zotero.DragDrop.currentOrientation != 0) { @@ -2262,17 +2273,6 @@ var ItemTree = class ItemTree extends LibraryTree { } } - let { firstColumn } = columns.reduce((acc, column) => { - return !column.hidden && column.ordinal < acc.lowestOrdinal - ? { lowestOrdinal: column.ordinal, firstColumn: column } - : acc; - }, { lowestOrdinal: Infinity, firstColumn: null }); - - this._renderCtx.firstColumn = firstColumn; - this._renderCtx.includeTrashed = this.rowProvider.includeTrashed; - - row.renderRow(div, index, columns, rowData, this._renderCtx); - if (!oldDiv) { if (this.props.dragAndDrop && row.isDraggable) { div.setAttribute('draggable', true);