Frontmatter
| id | 9530 |
| title | Grid cells vanish during column resize after a drag-and-drop column reorder |
| state | Closed |
| labels | bugaigrid |
| assignees | tobiu |
| createdAt | Mar 20, 2026, 9:07 PM |
| updatedAt | Mar 20, 2026, 9:18 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9530 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 20, 2026, 9:16 PM |
Grid cells vanish during column resize after a drag-and-drop column reorder
tobiu changed title from Grid cells vanish during rapid resize after column sort to Grid cells vanish during column resize after a drag-and-drop column reorder on Mar 20, 2026, 9:14 PM
tobiu assigned to @tobiu on Mar 20, 2026, 9:15 PM

tobiu
Mar 20, 2026, 9:15 PM
Input from Gemini 3.1 Pro:
✦ The
updateCellPositionsmethod insrc/grid/Body.mjswas refactored to:
- Eliminate spatial (
pos.x > minX) logic and instead rely on robust, single-pass iteration using thecolumnPositionsarray order, making it immune to absolute viewport coordinate pollution.- Introduce a self-healing block that explicitly deletes
style.visibilitybefore applying the delta, ensuring that stalevisibility: 'hidden'state left behind by the asynchronous 20ms timeout queue is safely cleared during thedrag:movetick.The update has been pushed to the
devbranch. Closing this ticket.
tobiu closed this issue on Mar 20, 2026, 9:16 PM
Description
We encountered a glitch where grid cells can vanish during a column resize operation if the grid columns were previously reordered via drag-and-drop. This occurs regardless of how much time passes between the reorder and the resize.
Reproduction
SortZone(drag-and-drop reordering) andResizableon a grid.drag:movecycle, but reappear when the drag ends.Root Cause Analysis
During a drag-and-drop column reorder (
SortZone.onDragStart), the cells of the dragged column are explicitly hidden (cell.style.visibility = 'hidden'). While the cells correctly reappear in the DOM upon drop, the VDOM state somehow retains or inherits this hidden visibility state in the App Worker. When a subsequentdrag:moveresize operation triggersupdateCellPositions(which performs a shallowupdateDepth: 2sync to the VDOM), the VDOM worker blindly reapplies the stalevisibility: 'hidden'state to the previously reordered column.Solution
Implement a self-healing safety net inside
updateCellPositionsinsrc/grid/Body.mjs. If it encounters a cell withstyle.visibility === 'hidden', it explicitly deletes the visibility property before generating the shallow update delta. Additionally, theupdateCellPositionsloop was optimized to rely on linear array order rather than spatial math, making the calculation more robust.