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

Window Not Opening Right

1 Answer 228 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Veteran
Jamie asked on 25 May 2020, 04:11 PM

I'm trying to use the window in multiple spots in a small application I'm building that's using version 2020.2.513 of Kendo UI for Jquery.  I've used this many times before and never had these problems.  For some reason now when I try and use the window, no matter how I use it, I get an odd behavior.  When I first click my button that should open the window, nothing happens visually (using the inspector I can see that it moves my div tag).  When I click the button a second time, it'll open the window but then the rest of the screen goes white, the html tag does some weird sizing things that pushes everything on my page up (including the window), and the window is cut off.  

Any ideas?  I can't share everything but I've attached a screen show of the behavior after the second click and below is the code I'm using.

I'm literally just using a slightly modified version of the ajax example and it still happens:

function loadHelp() {
    $("#time-window").kendoWindow({
        width: "615px",
        title: "Help",
        content: "Time-Help.htm",
        close: function() {
             //do something
        }
    });
}
    

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 27 May 2020, 12:57 PM

Hello Jamie,

The Window is being initialized in the loadHelp function, so that means a new Window instance is created on every click of the button. That could be problematic unless there is logic that destroys previous instances. I would suggest 2 alternative approaches you could give a try to:

1. Initialize the Window initially and just open it in the loadHelp function, instead of re-initializing it: https://dojo.telerik.com/OqeMonOG

2. If for some reason re-initialization is needed, destroy the existing instance before initializing a new one: https://dojo.telerik.com/OqUgariX/2

 

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Window
Asked by
Jamie
Top achievements
Rank 1
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or