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

Issue about open two modal windows

1 Answer 853 Views
Window
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 30 Sep 2015, 07:12 AM

Hello,

Does Window component support nested modal window?

I tried to open two modal windows like the sample code

<script type="text/JavaScript">
function openWinOne() {
    var winOne = jQuery("\#win_one");
    if (!winOne.data("kendoWindow")) {
        winOne.kendoWindow({
            modal: true
        }).data("kendoWindow").center();
    }
    ......
}
function openWinTwo() {
    var winOne = jQuery("\#win_two");
    if (!winOne.data("kendoWindow")) {
        winOne.kendoWindow({
            modal: true
        }).data("kendoWindow").center();
    }
    ......
}
</script>
 
<div id="test">
    <button onClick="openWinOne();">
</div>
<div id="win_one" style="display: none;">
    <button onClick="openWinTwo();">
</div>
<div id="win_two" style="display: none;">
</div>

When closing the 2nd modal window, the focus is returned to 1st modal window but the background mask is also removed.

How can I keep the background mask when closing the nested modal windows?

1 Answer, 1 is accepted

Sort by
0
Atanas Georgiev
Telerik team
answered on 30 Sep 2015, 01:26 PM
Hello Williap,

Please refer to the following dojo snippet, showing modal window opened over another modal window. I hope it will be of help in implementing your use case.

Regards,
Atanas Georgiev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Window
Asked by
William
Top achievements
Rank 1
Answers by
Atanas Georgiev
Telerik team
Share this question
or