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

[Solved] grey overlay not clearing when closing a window

2 Answers 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shane
Top achievements
Rank 1
Shane asked on 09 Mar 2012, 04:37 AM

Using Telerik MVC Extensions Q1 2012

I have a project which opens a dynamic Telerik Window, which contains a form.
When this form is save, I am using a telerik prompt window to capture some extra information.
The save button on the form opens the prompt, which will then do an ajax call to submit the form and close the telerik window.
Sometimes this works correctly ( the first time?) but subsequent saves close the window, but do not remove the grey overlay over the page, preventing further page interaction until the page is refreshed.


Normally the onClose function on the window contains:

onClose: function (e) {
               e.preventDefault();
               $(ruleEditApp.windowName).data('tWindow').destroy();
},

This has not been working, and so I have changed this function to:

  onClose: function (e) {
                 e.preventDefault();
                 $(ruleEditApp.windowName).data('tWindow').destroy();
                 if ($(".t-overlay")!=null)
                    $(".t-overlay").remove()
},

This will find the errant overlay and remove it, allowing access to the page again.

I think this is a bug in the close window functions in the telerik code when 2 modal windows are open.

Hope this helps someone

2 Answers, 1 is accepted

Sort by
0
Shane
Top achievements
Rank 1
answered on 12 Mar 2012, 02:25 AM
I was wrong.

On Friday I could not get this to break, but this morning I am getting the same error with the grey overlay not clearing. This is especially prevalent when opening and closing the prompt window dialog several times before closing the first popup window.

The onClose script is being called, but this remians on the page: ( with the z-index changing dfor different page loads..)

<div class="t-overlay" style="z-index: 10034;"/>

Dear Telerik, any ideas?
0
Dimo
Telerik team
answered on 13 Mar 2012, 10:45 AM
Hi Shane,

Please close() the Window before calling desctroy(). This should be fixed in the current official version by the way.

All the best,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Window
Asked by
Shane
Top achievements
Rank 1
Answers by
Shane
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or