Hi Telerik,
As a disclaimer, this question is vague. My issue is that, under certain conditions, a RadWindow will re-open itself and become non-responsive to user interaction. For instance, if I have some client-side code which is executing (may or may not center the RadWindow), and the user closes the window before this code finishes executing. Then, when the code finishes executing, the window pops back open! If the user clicks on the 'X' it does not close the window.
I suspect this is entirely my fault... possibly should not allow closing of the window until fully loaded, or find a way to cancel client-side script execution. Regardless, I was looking for a blanket fix to make sure this problem doesn't accidentally rear its head to a customer.
At this point, I'm doing something like this:
In this scenario, I handle the browser window resizing. If there is an open window, I would like to move it back to the center of the page. It is my impression that calling oWindow.center on an element which is defined, but not visible, is dangerous in that it may show the window again?
Does what I'm doing make sense? Have you heard of other users experiencing similar issues / is there a standard way of handling this? Or is it just "code better and not defensively" and make sure that the state of my window is such that at any point in time, if its closed, it can respond intuitively.
Cheers,
Sean
As a disclaimer, this question is vague. My issue is that, under certain conditions, a RadWindow will re-open itself and become non-responsive to user interaction. For instance, if I have some client-side code which is executing (may or may not center the RadWindow), and the user closes the window before this code finishes executing. Then, when the code finishes executing, the window pops back open! If the user clicks on the 'X' it does not close the window.
I suspect this is entirely my fault... possibly should not allow closing of the window until fully loaded, or find a way to cancel client-side script execution. Regardless, I was looking for a blanket fix to make sure this problem doesn't accidentally rear its head to a customer.
At this point, I'm doing something like this:
//This will only trigger when the browser window resizes.
//Fix the display of the dashboard, if theres an open window, re-center it.
function
OnMainSplitterResizing() {
displayOverBaseID = baseSplitterID;
if
(oWindow && oWindow.isVisible) oWindow.center();
}
In this scenario, I handle the browser window resizing. If there is an open window, I would like to move it back to the center of the page. It is my impression that calling oWindow.center on an element which is defined, but not visible, is dangerous in that it may show the window again?
Does what I'm doing make sense? Have you heard of other users experiencing similar issues / is there a standard way of handling this? Or is it just "code better and not defensively" and make sure that the state of my window is such that at any point in time, if its closed, it can respond intuitively.
Cheers,
Sean