Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component: p-dialog bad drag behavior #13493

Closed
Algoritm211 opened this issue Aug 12, 2023 · 0 comments · Fixed by #13492
Closed

Component: p-dialog bad drag behavior #13493

Algoritm211 opened this issue Aug 12, 2023 · 0 comments · Fixed by #13492
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Algoritm211
Copy link
Contributor

Algoritm211 commented Aug 12, 2023

Describe the bug

If the user adds a margin to the p-dialog, he will have unexpected behaviour after starting to drag the dialog. When the user drags the dialog to the left - it automatically moves to the left. The reason for this bug is inside the logic of the calculation coordinates of the dialog, and we can solve it by removing margins from dialog coordinates calculation.

Current behaviour

first-1_vQ5eaKWM.mp4

Behavior after the fix

second-2_EjrfYrzf.mp4

This issue linked to the fixes for PrimeVue and PrimeReact

Environment

Local and production on a server

Reproducer

first-1_vQ5eaKWM.mp4

Angular version

16.2.0

PrimeNG version

16.2.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.17.1

Browser(s)

Safari 15, Chrome 100+

Steps to reproduce the behavior

  1. Create a new Component and use the p-dialog component in a template.
  2. Add a button to the template to trigger the popup appearing.
  3. Add a class which adds margin ("mx-4" for example) to the p-dialog component using styleClass property.
  4. Click the button to popup appears.
  5. After the dialog appears try to drag it to the left.
  6. The dialog moves to the right.

Expected behavior

second-2_EjrfYrzf.mp4

Users can drag dialog to the left after adding margins

@Algoritm211 Algoritm211 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 12, 2023
@mertsincan mertsincan added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 29, 2023
@mertsincan mertsincan added this to the 16.2.1 milestone Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants