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

Prevent modal close on mouse press up if outside the dialog #5781

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

venkat-karasani
Copy link
Contributor

Changes
The dialog is being closed because of the click handler being attached inside the addBackdropOverlay in dialogHelper. As it is being used in multiple places, we cannot disable the adding of these listeners. From now, whenever we want to prevent a dialog to be closed on click or right click, we have to pass an additional options object to the dialog.open method and it should have preventCloseOnClick, preventCloseOnRightClick set to true which will prevent the attaching of the corresponding event listener and there by prevents the closing of dialog on click or right click.

This PR will prevent the closing of edit metadata dialog on both click and right click.

Issues
ex. Fixes #5723

@venkat-karasani venkat-karasani requested a review from a team as a code owner July 13, 2024 17:57
@venkat-karasani venkat-karasani changed the title Prevent modal clos on mouse press up if outside the dialog Prevent modal close on mouse press up if outside the dialog Jul 13, 2024
@thornbill thornbill added the enhancement Improve existing functionality or small fixes label Jul 26, 2024
@thornbill thornbill added this to the v10.10.0 milestone Jul 26, 2024
Copy link

sonarcloud bot commented Jul 26, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
1 Accepted issue

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@thornbill thornbill merged commit c3a00e2 into jellyfin:master Jul 26, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing functionality or small fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue]: Modal closes on mouse press up if outside the dialog
2 participants