mirror of
https://github.com/zotero/zotero.git
synced 2026-10-07 02:58:09 +00:00
Fix row contents shifting when showing a between-rows drop indicator
Some checks are pending
Some checks are pending
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 from5ca1fbb167, which replaced the .first-column class with :first-child. (cherry picked from commitc30163ed90)
This commit is contained in:
parent
b7a1d6c2bf
commit
4e16706b9a
1 changed files with 11 additions and 11 deletions
|
|
@ -2249,6 +2249,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) {
|
||||
|
|
@ -2261,17 +2272,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