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: Performing "onMouseDown" inside the Dialog and "onMouseUp" outside of it closes the dialog when "dismissableMask" is true #3962

Closed
VentuzVictorPerez opened this issue Jan 16, 2023 · 9 comments · Fixed by #3963
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@VentuzVictorPerez
Copy link

Describe the bug

Having "dismissableMask" as "true" in a Dialog, it closes automatically when an "onMouseDown" is performed inside the Dialog, for example selecting text inside an InputNumber / p and then releasing the mouse ("onMouseUp") outside the Dialog.

This causes bad user interaction and assuming that the Dialog contains a Form with several components, editing the InputNumber quickly and selecting the text inside causes it to close unexpectedly (see gif).

dialog_err

Reproducer

https://codesandbox.io/s/primereact-test-forked-uym2ut?file=/src/index.js:750-765

PrimeReact version

8.7.3

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

Chrome 108

Steps to reproduce the behavior

  1. Open the dialog in the forked project.
  2. Write something in the input number
  3. Select the input text quickly and release the mouse outside the dialog.

-- It closes unexpectadly --.

Expected behavior

The dialog should remain displayed since officially an "onClick" was not performed outside of it ("onMouseDown" was performed inside and "onMouseUp" was performed outside).

@VentuzVictorPerez VentuzVictorPerez added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 16, 2023
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 16, 2023
@melloware melloware self-assigned this Jan 16, 2023
@melloware melloware added this to the 8.7.4 milestone Jan 16, 2023
@melloware
Copy link
Member

Thanks for the reproducer its interesting I can make it happen with Create React App but not with Next. I have a fix that will work for both.

@VentuzVictorPerez
Copy link
Author

VentuzVictorPerez commented Apr 13, 2023

Is there a possibility to release this fix in a minor version of 9.x.x instead of waiting until 10? Thanks

(Sorry, I inadvertently closed and reopened the issue)

@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 13, 2023
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 13, 2023
@melloware
Copy link
Member

its OK I have assigned PrimeTek to review my PR.

@VentuzVictorPerez
Copy link
Author

Cool, thanks

@VentuzVictorPerez
Copy link
Author

Hi @melloware , just to clarify, are we waiting for their response on the pull request you made in January, or did you re-request it after my question last week?

@melloware
Copy link
Member

Yep PrimeTek was working on major changes like today's 9.3.0 release allowing custom icons everywhere. So they have not been merging PR's

@VentuzVictorPerez
Copy link
Author

But I have a feeling that they are only going to look at PR's that correspond to milestone 9.x.x, this issue is tagged with Milestone 10.0.0, hence my original question.

Is there a possibility to release this fix in a minor version of 9.x.x instead of waiting until 10? Thanks

(Sorry, I inadvertently closed and reopened the issue)

@melloware
Copy link
Member

@VentuzVictor if you need this fixed sooner I suggest you investigate PRO support: https://primereact.org/support/

@VentuzVictorPerez
Copy link
Author

Cool, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants