This is a migrated thread and some comments may be shown as answers.

window zindex problem

2 Answers 1005 Views
Window
This is a migrated thread and some comments may be shown as answers.
ben
Top achievements
Rank 1
ben asked on 29 Aug 2016, 08:21 AM

Hi,

I'm using angularjs with kendo.ui.

I had created some windows and I use $(".k-window").css("z-index", 25) to set the windows' zindex for my requirement.

The problem was these windows would overlay each other according to the create order in html.

If I focus on one window it should auto toFront other windows.

If I didn't set the index, above problem will not appear since the default toFront function.

How can I do if I want to set the windows' index but the default toFront function will work?

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Ianko
Telerik team
answered on 30 Aug 2016, 06:21 AM

Hello Ben,

 

Kendo Window toFront method expects all .k-window elements' z-index to increment successively. Therefore, setting all .k-window elements' z-index to 25 breaks the toFront logic.

 

I recommend you using logic that increments the z-index of each other popup. Here you are an example for that: 

 

 var zIndex  = 25;
$(".k-window").each(function(i, elem){
$(elem).css("z-index", ++zIndex);
});

 

Regards,
Ianko
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
ben
Top achievements
Rank 1
answered on 31 Aug 2016, 01:34 AM

Hello lanko,

Your code work for me! Thank you for your help.

Tags
Window
Asked by
ben
Top achievements
Rank 1
Answers by
Ianko
Telerik team
ben
Top achievements
Rank 1
Share this question
or