Skip to content

Dialog: When out of the viewport, dialog cannot be esaily dragged back #8090

@Simbayyy

Description

@Simbayyy

Describe the bug

When a part of a draggable dialog is partially out of the viewport (because of resizing, of content that expands in the dialog...), it is difficult to drag the dialog back in. It needs to be dragged back enough so that it would entirely be inside the viewport, at which point the dialog snaps back in at once.

Reproducer

https://stackblitz.com/edit/vitejs-vite-ktbsa6vq

System Information

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    primereact: latest => 10.9.5 
    react: ^19.1.0 => 19.1.0

Steps to reproduce the behavior

  1. Go to [reproducer]{https://stackblitz.com/edit/vitejs-vite-ktbsa6vq}
  2. Drag dialog to bottom of the viewport
  3. Click on accordion to expand it - the dalog should overflow out of the viewport
  4. Try and drag dialog up to be fully into the viewport
  5. Dialog snaps in at once

Expected behavior

Dialog should move up progressively when dragged back in the viewport

Metadata

Metadata

Assignees

Labels

Type: BugIssue contains a defect related to a specific component.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions