Frontmatter
| id | 8120 |
| title | Regression: SortZone calculates item layout after placeholder insertion, causing incorrect positioning |
| state | Closed |
| labels | bugairegression |
| assignees | tobiu |
| createdAt | Dec 16, 2025, 11:58 AM |
| updatedAt | Dec 16, 2025, 12:10 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8120 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Dec 16, 2025, 12:10 PM |
Regression: SortZone calculates item layout after placeholder insertion, causing incorrect positioning
tobiu assigned to @tobiu on Dec 16, 2025, 11:59 AM
tobiu changed title from Regression: SortZone dragPlaceholder missing margins causing layout shift to Regression: SortZone calculates item layout after placeholder insertion, causing incorrect positioning on Dec 16, 2025, 12:09 PM
tobiu closed this issue on Dec 16, 2025, 12:10 PM
When dragging items in a
SortZonewhere items have margins (e.g.,&:not(:first-child) { margin-left: 20px; }), the layout calculations (getDomRect) were previously occurring afterdragStart.dragStartinserts adragPlaceholderwhich modifies the DOM structure. If this placeholder doesn't perfectly mimic the original item's margins immediately, the remaining siblings shift positions (e.g. collapsing the gap). SincegetDomRectwas called after this shift, the captureditemRectswere incorrect (missing the gaps), causing items to overlap when absolute positioning was applied.Fix: The
onDragStartlogic insrc/draggable/container/SortZone.mjshas been reordered to:getDomRect) and captureitemStylesbefore callingdragStart.