Skip to content

[Bug](react-draggable-dialog): Updating position after component is rendered breaks dnd #606

@creage

Description

@creage

Package

react-draggable-dialog

Package version

0.2.4

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (28) x64 13th Gen Intel(R) Core(TM) i7-13850HX
    Memory: 3.64 GB / 31.66 GB
  Browsers:
    Chrome: 144.0.7559.133
    Edge: Chromium (142.0.3595.94)

Current Behavior

Dialog reverts to initial position on mousedown, when position property updated after component render.

Expected Behavior

Dialog respects updated position, and follows the mouse.

Reproduction

https://storybooks.fluentui.dev/react/?path=/docs/contrib_packages-react-draggable-dialog--docs#custom-position

Steps to reproduce

  1. Go to Demo site, scroll to "Custom position section" https://storybooks.fluentui.dev/react/?path=/docs/contrib_packages-react-draggable-dialog--docs#custom-position
  2. Click "Open dialog" button with default position values (100 x 100)
  3. Change X position by clicking up/down arrows in the input - Dialog moves accordingly.
  4. Try to move dialog by mouse

Are you reporting an Accessibility issue?

None

Suggested severity

Urgent - No workaround and Products/sites are affected

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreact-draggable-dialogMain label for the @fluentui-contrib/react-draggable-dialog package

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions