Declined
Last Updated: 03 Dec 2024 10:00 by ADMIN
Eric
Created on: 26 Jan 2023 01:46
Category: Window
Type: Bug Report
0
Stacking Z-Index functionality is not working

The described functionality listed on https://demos.telerik.com/blazor-ui/window/stacking-windows

"The Telerik Window component for Blazor provides stacking z-index functionality that brings to front the component any time it receives focus."

doesn't appear to be working in the demo. When the one window receives focus the z-index does not change.  This appears to not work correctly in the demo either. 

10 comments
ADMIN
Dimo
Posted on: 03 Dec 2024 10:00

Michal, the issue was fixed recently together with a related regression.

A possible workaround is to increment the z-index of the second Window with JavaScript: https://blazorrepl.telerik.com/GIFckRYZ59obEEDL22

Michal
Posted on: 03 Dec 2024 09:22

You were quick :)

, here is your modified repl, also reproducible:

https://blazorrepl.telerik.com/wSlQOHOt21VOkuik23

 

ADMIN
Dimo
Posted on: 03 Dec 2024 09:17

Hi Michal,

I reproduced the problem, no need to send a ticket. We will investigate and follow up.

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Michal
Posted on: 03 Dec 2024 09:07

Hello Dimo,

 ok thanks, ill go with new ticket.

Its not randomly, its exact at "same" number of clicks.(after the second open-close-open-close)

 

Even your scenario is not "nested", you have side by side windows, in the markup. Image in at as component inside component inside component and so on. Iam minimized the reproducible scenario just on the 2 levels. Real number of nesting is N.

 

ADMIN
Dimo
Posted on: 03 Dec 2024 09:03

Hello Michal,

The described problem looks different and non-relevant to the original thread topic. It's best to open a separate ticket about the scenario and send us a runnable example that reproduces it. If the issue occurs randomly, it may be due to a race condition and/or the specific implementation.

I created the following test page, which works as expected. You can use it as a base:

@using Telerik.DataSource
@using Telerik.DataSource.Extensions

<TelerikGrid OnRead="@OnGridRead"
             TItem="@SampleModel"
             FilterMode="GridFilterMode.FilterRow"
             Pageable="true"
             Sortable="true">
    <GridColumns>
        <GridCommandColumn>
            <GridCommandButton OnClick="@( () => WindowVisible1 = true)" Icon="@SvgIcon.Window" />
        </GridCommandColumn>
        <GridColumn Field="@nameof(SampleModel.Name)" />
        <GridColumn Field="@nameof(SampleModel.Price)" />
        <GridColumn Field="@nameof(SampleModel.Quantity)" />
    </GridColumns>
</TelerikGrid>

<TelerikWindow @bind-Visible="@WindowVisible1"
               Modal="true">
    <WindowActions>
        <WindowAction Name="Close" />
    </WindowActions>
    <WindowTitle>
        1 Window Title 1
    </WindowTitle>
    <WindowContent>
        <TelerikGrid OnRead="@OnGridRead"
                     TItem="@SampleModel"
                     FilterMode="GridFilterMode.FilterRow"
                     Pageable="true"
                     Sortable="true">
            <GridColumns>
                <GridCommandColumn>
                    <GridCommandButton OnClick="@( () => WindowVisible2 = true)" Icon="@SvgIcon.Window" />
                </GridCommandColumn>
                <GridColumn Field="@nameof(SampleModel.Name)" />
                <GridColumn Field="@nameof(SampleModel.Price)" />
                <GridColumn Field="@nameof(SampleModel.Quantity)" />
            </GridColumns>
        </TelerikGrid>
    </WindowContent>
    <WindowFooter>
        <TelerikButton OnClick="@( () => WindowVisible1 = false )">Close</TelerikButton>
    </WindowFooter>
</TelerikWindow>

<TelerikWindow @bind-Visible="@WindowVisible2"
               Modal="true">
    <WindowActions>
        <WindowAction Name="Close" />
    </WindowActions>
    <WindowTitle>
        2 Window Title 2
    </WindowTitle>
    <WindowContent>
        2 Window Content 2
    </WindowContent>
    <WindowFooter>
        <TelerikButton OnClick="@( () => WindowVisible2 = false )">Close</TelerikButton>
    </WindowFooter>
</TelerikWindow>

@code {
    private bool WindowVisible1 { get; set; }
    private bool WindowVisible2 { get; set; }

    private List<SampleModel> GridData { get; set; } = new();

    private async Task OnGridRead(GridReadEventArgs args)
    {
        DataSourceResult result = await GridData.ToDataSourceResultAsync(args.Request);

        args.Data = result.Data;
        args.Total = result.Total;
        args.AggregateResults = result.AggregateResults;
    }

    protected override void OnInitialized()
    {
        for (int i = 1; i <= 7; i++)
        {
            GridData.Add(new SampleModel()
            {
                Id = i,
                Name = $"Name {i}",
                GroupName = $"Group {i % 3 + 1}",
                Price = Random.Shared.Next(1, 100) * 1.23m,
                Quantity = Random.Shared.Next(0, 1000),
                StartDate = DateTime.Now.AddDays(-Random.Shared.Next(60, 1000)),
                IsActive = i % 4 > 0
            });
        }
    }

    public class SampleModel
    {
        public int Id { get; set; }
        public string Name { get; set; } = string.Empty;
        public string GroupName { get; set; } = string.Empty;
        public decimal Price { get; set; }
        public int Quantity { get; set; }
        public DateTime StartDate { get; set; }
        public bool IsActive { get; set; }
    }
}

 

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Michal
Posted on: 02 Dec 2024 17:46

Hi,

 seems like this bug is back in version 7.0.0. (blazor server .net 8.0)

Zindex is wrong(exactly at -1 level) ie :10006 vs 10007...

Detail is in video, but after FEW clicking, not at first 2 clicks.


Scenario - flow:

Grid 1>commanm button click-> open widnow 1- >Component A inside window 1
Component A->Grid 2->commanm button click-> open widnow 2- >Component B inside window 2


Or, siply said, nested windows like this:
<mainPage>
<TelerikWindow 1 @bind-Visible=W1>
...
<TelerikWindow 2 @bind-Visible=W2>

...
</TelerikWindow>
...

</TelerikWindow>
</mainPage

how to reproduce(what you have at video):
1) open window 1 from grid 1
2) open window 2 from grid 2 ***!!  (error at 0:17 and 0:29)
3) close window 2 - ok
4) open window 2 from grid 2 - ok
3) close window 2 - ok
5) close window 1 - ok
goto 1) 
Grid->OnRead

Doesnt matter if closing but ESC keyboard,cross at window header, or close at window footer
Crucial is closing and reopening whole "window tree" back 2 times.

 

Demo from here,
https://demos.telerik.com/blazor-ui/window/stacking-windows
is not the same scenario. Not a "real nested windows" - its windows side by side at layout.

 

What doesnt working as hotfix:

//W2= false;
//await Task.Delay(100);
W2= true;
//await Task.Delay(10);
//W2.Window_FocusIn();
//StateHasChanged();

 

Any ideas, what can help, or opening new ticket is required?

Attached Files:
Rahul
Posted on: 09 Aug 2024 09:55

Hi Dimo,

Thank you for explaining the different scenarios and suggesting workarounds. I also appreciate you logging the public bug on my behalf.

ADMIN
Dimo
Posted on: 09 Aug 2024 08:16

Hi Rahul,

I observe the following behavior on our online demo:

  1. The "Personal Information" Window is initially visible.
  2. I click on "Show Address Form".
  3. The "Address Information" Window appears over the "Personal Information" Window. This is the correct behavior.
  4. I click on "Show Personal Information". The "Personal Information" Window doesn't appear on top, because the button only sets its Visible property, which is already true. In other words, there is no change in the app state, so there is no change in the UI. This is expected. It is possible to work around this situation with a trick - call the internal Window method, which focuses the component and brings it to front. Note that this approach is not officially supported or documented. Another option is to hide the Window before showing it, and insert an await Task.Delay(1) between hiding and showing it.
  5. I move the "Address Information" Window (which is on top) to the side.
  6. I click on the titlebar of the "Personal Information". Window The Window seems to disappear, but what happens is that its position moves unexpectedly. The component is at the bottom of the page. This is a bug, and I logged it separately on your behalf. There is also a workaround. The issue may also be related to this one about centering the Window.

Let me know if you are talking about a different scenario. In this case, please provide detailed steps to reproduce.

Regards,
Dimo
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

Rahul
Posted on: 05 Aug 2024 09:12

Hi Eric,

I'm facing similar issue in our live application. Still I'm seeing Demo page having same issue: https://demos.telerik.com/blazor-ui/window/stacking-windows.

In nested dialog box, we have treeview - during data binding modal window appearing behind the parent window and then once data loaded to treeview it's appearing in front.

 

Also, I reviewed sample code posted by Radko https://blazorrepl.telerik.com/QROvcUui47Ffzscp56 seems working fine. But in the real scinario it having issue as mentioned above.

Anyone please suggest work round on it. I'm using UI for Blazor version: 6.0.2

 

 

ADMIN
Radko
Posted on: 26 Jan 2023 08:55

Hi Eric,

I can confirm that the functionality is working as expected, and the z-index style is correctly incremented each time a Window gains focus. However, there is indeed an issue, but it is due to the demo example itself. To be more specific, the z-index of each Window is overridden by a `.demo-window` selector. Now that you have brought this to our attention, we will update the demo, so the custom styling of the demo does not interfere with the demonstrated functionality - thank you for bringing it up.

I have also prepared an example, where the above-mentioned selector is removed, and the functionality can be tested: https://blazorrepl.telerik.com/QROvcUui47Ffzscp56

Regards, Radko Stanev Progress Telerik

Learn about the important changes coming in UI for Blazor 4.0 in January 2023!