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

Make dialogs non-cancelable on Android #101689

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

syntaxerror247
Copy link
Member

@syntaxerror247 syntaxerror247 commented Jan 17, 2025

This PR addresses dialog canceling behavior in the app. Currently, native-dialogs are canceled when the user presses the back button or taps outside the dialog.
This PR is disabling this behavior to prevent unintentional dismissals. However, it's open for discussion whether we should disable canceling by both touch outside and back press, only touch outside, or leave the current behavior as is.

@syntaxerror247 syntaxerror247 requested a review from a team as a code owner January 17, 2025 14:22
@syntaxerror247 syntaxerror247 changed the title Make dialogs non-cancelable on Android. Make dialogs non-cancelable on Android Jan 17, 2025
@AThousandShips AThousandShips added this to the 4.x milestone Jan 17, 2025
@m4gr3d
Copy link
Contributor

m4gr3d commented Jan 17, 2025

What is the behavior of the native dialogs on desktop OSes?

@bruvzg
Copy link
Member

bruvzg commented Jan 17, 2025

At least on macOS, native dialogs are non-cancelable (do not have window close button, and do not close on Esc, or clicks outside).

@bruvzg
Copy link
Member

bruvzg commented Jan 17, 2025

On Windows, input dialog is also non-cancelable, but button dialog is (and do not stay on top of parent, so it's likely a bug).

@syntaxerror247
Copy link
Member Author

syntaxerror247 commented Jan 17, 2025

@bruvzg There seems to be one more bug with button dialog on Windows, Close button also returns index 2. I guess, fixing this would also make it non-cancelable.

@bruvzg
Copy link
Member

bruvzg commented Jan 17, 2025

#101697 ← fix for Windows.

@syntaxerror247 syntaxerror247 modified the milestones: 4.x, 4.4 Jan 17, 2025
@Repiteo Repiteo merged commit 24fb28a into godotengine:master Jan 20, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jan 20, 2025

Thanks!

@syntaxerror247 syntaxerror247 deleted the native-dialogs branch January 20, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants