microsoft / fluentui-blazor

Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
https://www.fluentui-blazor.net
MIT License
3.87k stars 376 forks source link

DialogParameters Model Property Does Opposite to What It's Set #1224

Closed marqdouj-spartan closed 10 months ago

marqdouj-spartan commented 10 months ago

🐛 Bug Report

When the dialog parameters modal property = true it acts as non-modal; when it's false it's modal.

💻 Repro or Code Sample

This can be demonstrated by the example posted in the documentation: https://www.fluentui-blazor.net/Dialog

See the "DialogService with IDialogReference" section:

image

🤔 Expected Behavior

When Modal = true the dialog should be modal; when Modal = false the dialog should be non-modal.

😯 Current Behavior

When Modal is checked the dialog is non-modal; when modal is not checked the dialog is modal.

🌍 Your Environment

VS 2022 17.8.3

  • OS & Device: Windows 10 Laptop
  • Browser: Microsoft Edge
vnbaaij commented 10 months ago

Yes, this is a bit of a weird situation. We are doing it exactly the same as the web components are doing it but you are correct that it is not how it is generally perceived to work (although there are others who are doing it the same). The W3C guidance around it is a bit vague (https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) and talks only about being able to interact with content shown behind the dialog. Did you see that you can change the behavior by using PreventDismissOnOverlayClick (https://www.fluentui-blazor.net/Dialog#customizeddialog)

I believe they are changing the behavior for v3 of the web omponents and then we will change it too. Unfortunately we can't change it now as this would mean a breaking change.

marqdouj-spartan commented 10 months ago

Thanks for the explanation.