Dragging is buggy for axis and offsetPosition

Author: boris-brtanCreated Apr 10, 2022Updated Sep 27, 2026
Labelsbugneeds-triage

Description

  • If we have set axis to 'x | y | none' position is changed also for the axis that is not draggable at that moment.
    If we drag for example on X with Y axis set to 10px and after we enable also Y axis the position does not have the 10px but the one where we ended drag before.
  • if we have set offset position to the middle of the element and we start to drag on title element,
    the element jumps to -width/2 -height/2

Expected result

  • do not update not active axis while dragging and on dragEnd
  • do not jump the element under mouse cursor regardless the offsetPosition values

Source: react-grid-layout/react-draggable