mirror of
https://github.com/zotero/zotero.git
synced 2026-10-01 02:01:24 +00:00
Fix row contents shifting when showing a between-rows drop indicator
Some checks are pending
CI / Detect changes (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
Some checks are pending
CI / Detect changes (push) Waiting to run
CI / Utilities Tests (push) Waiting to run
CI / Build, Upload (push) Waiting to run
CI / Test () (push) Blocked by required conditions
CI / Test (macOS NFS) (push) Blocked by required conditions
CI / Test (Windows arm64) (push) Blocked by required conditions
CI / Test (Windows x64) (push) Blocked by required conditions
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.
This commit is contained in:
parent
1d4b8bc89a
commit
c30163ed90
1 changed files with 11 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue