window zindex problem

3 posts, 1 answers
  1. ben
    ben avatar
    4 posts
    Member since:
    Aug 2016

    Posted 29 Aug Link to this post

    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. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 30 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. ben
    ben avatar
    4 posts
    Member since:
    Aug 2016

    Posted 30 Aug Link to this post

    Hello lanko,

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

Back to Top