Skip to content

Conversation

@rainerregan
Copy link

Problem:

  • Custom drag-and-drop operations were failing with DropLocationDeterminer.ts:254 Uncaught TypeError: Cannot read properties of undefined (reading 'clone')
  • Occurred when component children existed in the model but didn't have valid DOM dimensions for sorting
    Mismatch between [children.length > 0]
  • Mismatch between children.length > 0 and empty childrenDimensions array caused undefined placeholderDimensions

Solution:

  • Adding condition to check nodeHasChildren and childrenDimensions.length > 0 before processing the positioning.
  • Adding null check on nodeDimensions.clone() to make sure placeholderDimensions is defined.
  • Prevent crashes when creating custom logic for drag and drop operation.

@artf
Copy link
Member

artf commented Oct 17, 2025

Hey thanks @rainerregan, looks like a legit fix but I'm wondering if by any chance you have an HTML snippet (the model but didn't have valid DOM dimensions for sorting) that could reproduce the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants