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

[FluentSplashScreen] Fix ESC on SplashScreen #1811

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

dvoituron
Copy link
Collaborator

[FluentSplashScreen] Fix ESC on SplashScreen

The DialogService.ShowSplashScreenAsync method did not apply the PreventDismissOnOverlayClick parameter.
This PR corrects this problem:

DialogParameters<SplashScreenContent> parameters = new()
{
    Content = new()
    {
        DisplayTime = 0,    // See Task.Delay below
        Title = "Core components",
        SubTitle = "Microsoft Fluent UI Blazor library",
        LoadingText = "Loading...",
        Message = (MarkupString)"some <i>extra</i> text <strong>here</strong>",
        Logo = FluentSplashScreen.LOGO,
    },
    PreventDismissOnOverlayClick = true,  // 👈 Set this line to avoid closing SplashScreen with ESC
    Width = "640px",
    Height = "480px",
};
_dialog = await DialogService.ShowSplashScreenAsync(parameters);

Fix #1803

@vnbaaij vnbaaij merged commit af24f63 into dev Apr 8, 2024
3 checks passed
@vnbaaij vnbaaij deleted the users/dvoituron/splashscreen-esc branch April 8, 2024 08:46
vnbaaij added a commit that referenced this pull request Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: SplashScreen is closable by pressing ESC key
2 participants