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

Dialog: dragging state is not reset when closed while dragging #6356

Closed
b7c opened this issue Sep 7, 2024 · 1 comment · Fixed by #6358 · May be fixed by nerdy-tech-com-gitub/litlyx#11
Closed

Dialog: dragging state is not reset when closed while dragging #6356

b7c opened this issue Sep 7, 2024 · 1 comment · Fixed by #6358 · May be fixed by nerdy-tech-com-gitub/litlyx#11
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@b7c
Copy link
Contributor

b7c commented Sep 7, 2024

Describe the bug

The dragging state of the dialog is not reset when it is closed (by hitting escape) while dragging.

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-buzsbf

PrimeVue version

4.0.5

Vue version

4.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Open a dialog
  2. Begin dragging the dialog
  3. Press escape while dragging the dialog to close it
  4. Re-open the dialog
  5. The dialog should follow the mouse without the mouse button being held

Expected behavior

The dialog's dragging state should reset once closed and the dialog should not follow the mouse when it is re-opened.

@b7c b7c added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 7, 2024
@b7c
Copy link
Contributor Author

b7c commented Sep 7, 2024

Additionally, the document body text cannot be selected after closing the dialog due to the applied style not being removed:

document.body.setAttribute('data-p-unselectable-text', 'true');
!this.isUnstyled && addStyle(document.body, { 'user-select': 'none' });

@tugcekucukoglu tugcekucukoglu 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 Sep 10, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.7 milestone Sep 10, 2024
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
2 participants