Duplicated
Last Updated: 28 Nov 2023 19:17 by ADMIN
Christian
Created on: 18 Sep 2023 08:04
Category: UI for Blazor
Type: Bug Report
9
DialogFactory: Generated dialogs have incorrect z-index and are shown behind a modal dialog.

Since upgrading from 3.8 to 4.4 (including all new css) created dialogs from DialogFactory are sometimes behind an already opened modal window.
The reason for this seems to be an incorrectly, automatically calculated z-index of 10003 when the open dialog has 10006.
This does not always happen, there are scenarios where the first created dialog works fine, and the next called in the same method suddenly is behind the dialog, thus the error seems to be in telerik and not our side.

We could not yet find a proper workaround apart from creating custom dialogs.

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
7 comments
ADMIN
Dimo
Posted on: 28 Nov 2023 19:17

Hi all,

If we start from this REPL example, which is discussed on this page, the workaround is to show the Dialog with a delay in the UpdateDate handler.

    public async Task UpdateDate(DateTime? dtChanged)
    {
        await Task.Delay(400);
        await Dialogs.ConfirmAsync("Really change date?", "Confirmation");
    }

The problem in the REPL example is that the Dialog shows while the DatePicker popup is still open. When the popup closes, the DatePicker takes back the focus, which moves the Window on top of the Dialog.

When you add the delay, the Dialog will show after the DatePicker gains focus, so it won't be able to steal it afterwards.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
ADMIN
Hristian Stefanov
Posted on: 05 Oct 2023 14:26

Hello,

Thank you all for helping me reproduce the behavior on my side.

Indeed, this is an actual bug. Thus, I'm including it as a part of an already existing one: Predefined Dialogs triggered from nested components or in OnInitialized don't cover a modal window.

I will also change the status of this item to "Duplicated" and send your votes to the original item.

Your cooperation was highly valued during the process of investigations.

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Christian
Posted on: 29 Sep 2023 16:32
Thank you Rytis, I did not find the time to generate a fitting example.
Here the custom code that opens a dialog after changing the date is producing a dialog behind the main dialog (move the window or you wont see it).
Rytis
Posted on: 29 Sep 2023 05:28

I'm sorry, maybe i was'nt so clear. I have added DatePicker with ValueChanged so u need to change date and it raises Confirm Dialog, so the Confirm dialog is behind modal. Not the alert dialog. Pls check again.

I have tried setting k-dialog-wrapper z-index to bigger but no use because it does not access main k-dialog-wrapper.
I have tried using OnChange event, same problem.

I have tried using not build in dialog, same problem.

ADMIN
Hristian Stefanov
Posted on: 28 Sep 2023 16:37

Hi Rytis,

I've conducted thorough testing on the provided REPL sample (https://blazorrepl.telerik.com/wnkXwMFk57sXYqvx43) using two different laptops. Surprisingly, the alert consistently remains correctly positioned above the window on both devices. This has led me to question whether the link provided is indeed the correct reference.

For additional clarity, I've also attached a video illustrating the behavior I'm encountering. You can review this behavior in the attached file, "alert-in-window.gif."

Could you please share an updated reproduction that accurately reflects the issue?

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Attached Files:
Rytis
Posted on: 28 Sep 2023 11:01

Hello, 

I have faced same problem, in my case the confirm dialog z-index is less tham modal.

I have updated Hristian REPL which represents problem - https://blazorrepl.telerik.com/wnkXwMFk57sXYqvx43

Can u provide at least temp solution to fix this issue?

ADMIN
Hristian Stefanov
Posted on: 22 Sep 2023 14:35

Hi Christian,

To investigate the issue, I attempted to replicate the problem by creating an example with a predefined dialog inside a modal window on versions 4.4 and 4.5. On my end, it seems that the predefined dialog is displayed correctly, always on top of the modal window. I'm sharing the sample via this REPL link for your reference, so you can compare it with the actual application to determine if anything is missing or if there are other factors that may be causing the issue.

As a next step, could you modify the above REPL sample to represent the configuration you are testing with? This will allow me to see the behavior firsthand and delve deeper into the scenario.

I look forward to your reply.

Regards,
Hristian Stefanov
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!