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

kendoWindow opens behind other windows

4 Answers 436 Views
Window
This is a migrated thread and some comments may be shown as answers.
Krithika
Top achievements
Rank 1
Krithika asked on 18 Jul 2017, 08:06 PM

Hello I have 2 problems:

1) When click a file upload button my  opens. If I open a  from inside that one, the new window opens behind the first one, even though it is modal. How do you force a  to open in front? See below:

this.m_oDlg.kendoWindow(
{
actions: [],
title: "Edit Document",
draggable: true,
width : 840,
height : 580, 
resizable : false,
scrolling : false,
modal : true,
open: function(e){
// OK Button
var divText = "<div style='float:right;'>";
divText += "<button title='OK' id='editorOK' class='k-button basicModalDialogButton' style='paddingTop: 5px;'>OK</button>";
divText += "</div>";
$("#docEditor").append(divText);

//Cancel Button
var divText1 = "<div style='float:right;'>";
divText1 += "<button title='Cancel' id='editorCancel' class='k-button basicModalDialogButton' style='paddingTop: 5px;'>Cancel</button>";
divText1 += "</div>";
$("#docEditor").append(divText1);

var win = this;
$("#editorCancel").click(function(){
win.close();
});
$("#editorOK").click(function(){
ProStarAPI.DocEditorDlg.onOK;
win.close();
});
}
});
//this.m_oDlg.data("kendoWindow").center().open();
var win = $("#docEditor");
win.data("kendoWindow").open();

2) The buttons declared in the open event disappear if i close the window and re-open it. 

Any help would be greatly appreciated. Thanks

4 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 20 Jul 2017, 07:35 AM
Hello,

I tried to investigate the provided code snippet in attempt to replicate the described issue, however, I am not fully certain about some usages. When is the kendoWindow initialized. What is the content of the first window that you create? As I can see, in the open event you are creating content for the second window. What elements and widgets are placed within the first one?

In addition, I tried to replicate the issue in a dojo example, but it seems that the second window is correctly show on top of the first one. Please see dojo example below:

http://dojo.telerik.com/@nenchef/AHuwe


Could you please modify the dojo example, in order to demonstrate us the exact issue that is experienced at your end? In addition, in such a manner we will be able to replicate the problem with the buttons that you described.

Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Krithika
Top achievements
Rank 1
answered on 20 Jul 2017, 04:45 PM

Thanks for the reply,

 

It should be noted that i am creating a div that houses the iframe for this as seen below:

show: function (, , )

this.m_oDlg = $("<div id='docEditor' style='display:inline;' class='contentWindow'></div>");
this.m_oCallback = oCallback;
this.m_szFileID = szFileID;
this.m_oFields = oFields;

var szBody = '<iframe id="deEditor" src="DocEditor.html" width="820" height="526" frameborder="0" scrolling="no"></iframe>';

this.m_oDlg.html();

 

 

Not sure if this div creation is causing the window to show up behind the first one?

0
Krithika
Top achievements
Rank 1
answered on 20 Jul 2017, 04:46 PM
these lines are right before the declaration 
0
Nencho
Telerik team
answered on 24 Jul 2017, 12:19 PM
Hello Krithika,

I tried to replicate the described issue with the second window opening behind the first one, base on the last provided information and code snippet, but to no avail. This is why, I would like to ask you to modify the previously provided dojo example, so we could be able to locally replicate the issue and pin down the reason for it.

Regards,
Nencho
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Krithika
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Krithika
Top achievements
Rank 1
Share this question
or