Behavior of DialogService becomes inconsistent with DialogOptions.CloseDialogOnEsc value #716

Closed
opened 2026-01-29 17:42:09 +00:00 by claunia · 2 comments
Owner

Originally created by @obratim on GitHub (Feb 3, 2023).

Describe the bug
Behavior of DialogService becomes inconsistent with DialogOptions.CloseDialogOnEsc value if user firstly opens dialog with DialogOptions.CloseDialogOnEsc == false and then - with DialogOptions.CloseDialogOnEsc == true

To Reproduce
Steps to reproduce the behavior:

  1. User opens a dialog, that must not be closed on pressing Esc, according to DialogOptions.
  2. User presses Esc - nothing happends, dialog remains opened, as expected.
  3. User closes dialog.
  4. User opens another dialog, that meant to be closed on Esc.
  5. User presses Esc - dialog closes, as expected.
  6. User again opens first dialog, that must not be closed on Esc.
  7. User presses Esc - dialog closes!

Sample project:
https://github.com/obratim/RadzenDialogServiceIssue

Expected behavior
I was expecting that dialog's behavior will follow DialogOptions parameters, no matter if previously was opened other dialogs with other parameters.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: ms edge, chrome
  • Version: Radzen.Blazor 4.6.5

Additional context
Type of application: Blazor WebAssembly with webservice.

Originally created by @obratim on GitHub (Feb 3, 2023). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** Behavior of DialogService becomes inconsistent with DialogOptions.CloseDialogOnEsc value if user firstly opens dialog with `DialogOptions.CloseDialogOnEsc == false` and then - with `DialogOptions.CloseDialogOnEsc == true` **To Reproduce** Steps to reproduce the behavior: 1. User opens a dialog, that must not be closed on pressing Esc, according to DialogOptions. 2. User presses Esc - nothing happends, dialog remains opened, as expected. 3. User closes dialog. 4. User opens another dialog, that meant to be closed on Esc. 5. User presses Esc - dialog closes, as expected. 6. User again opens first dialog, that must not be closed on Esc. 7. User presses Esc - dialog closes! Sample project: https://github.com/obratim/RadzenDialogServiceIssue **Expected behavior** I was expecting that dialog's behavior will follow DialogOptions parameters, no matter if previously was opened other dialogs with other parameters. **Desktop (please complete the following information):** - OS: Windows 10 - Browser: ms edge, chrome - Version: Radzen.Blazor 4.6.5 **Additional context** Type of application: Blazor WebAssembly with webservice.
Author
Owner

@obratim commented on GitHub (Feb 3, 2023):

Behavior of clicking around dialog is consistent with value DialogOptions.CloseDialogOnOverlayClick.

Only DialogOptions.CloseDialogOnEsc has issues.

@obratim commented on GitHub (Feb 3, 2023): Behavior of clicking around dialog is consistent with value `DialogOptions.CloseDialogOnOverlayClick`. Only `DialogOptions.CloseDialogOnEsc` has issues.
Author
Owner

@obratim commented on GitHub (Feb 6, 2023):

Updated to version 4.6.6

Bug still can be reproduced when first dialog is opened with options:

            CloseDialogOnEsc = false,
            CloseDialogOnOverlayClick = false,

and second dialog is opened with options:

            CloseDialogOnEsc = true,
            CloseDialogOnOverlayClick = true,

Steps to reproduce the behavior:

  1. User opens a dialog, that must not be closed on pressing Esc or on overlay click, according to DialogOptions.
  2. User presses Esc - nothing happends, dialog remains opened, as expected.
  3. User closes dialog.
  4. User opens another dialog, that meant to be closed on Esc or on overlay click.
  5. User clicks on overlay - dialog closes, as expected.
  6. User again opens first dialog, that must not be closed on Esc or on overlay click.
  7. User presses Esc - dialog closes!
@obratim commented on GitHub (Feb 6, 2023): Updated to version **4.6.6** Bug still can be reproduced when first dialog is opened with options: CloseDialogOnEsc = false, CloseDialogOnOverlayClick = false, and second dialog is opened with options: CloseDialogOnEsc = true, CloseDialogOnOverlayClick = true, **Steps to reproduce the behavior:** 1. User opens a dialog, that must not be closed on pressing Esc or on overlay click, according to DialogOptions. 2. User presses Esc - nothing happends, dialog remains opened, as expected. 3. User closes dialog. 4. User opens another dialog, that meant to be closed on Esc or on overlay click. 5. User clicks on overlay - dialog closes, as expected. 6. User again opens first dialog, that must not be closed on Esc or on overlay click. 7. User presses Esc - dialog closes!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#716