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

Reason for hiding other iframes when moving window?

3 Answers 120 Views
Window
This is a migrated thread and some comments may be shown as answers.
Caesar
Top achievements
Rank 1
Caesar asked on 28 Dec 2011, 02:48 PM
Hi,

We have a solution where the main window contains iframes.
When the the main window opens a modal RadWindow and the user moves the RadWindow, while dragging the RadWindow all other iframes below the RadWindow is hidden. This looks kinda ugly.

I found the script code in the RadWindow  that does this, the _setIframesVisible function in the ResizeExtender.
I tried to set the _hideIframes property in the ResizeExtender for my RadWindow in the show event:
if (this._window._resizeExtender)
            this._window._resizeExtender.set_hideIframes(false);

After this, the moving of the window was a lot nicer...
Is there a special reason for this behavior (didn't see any comment in source code), or is it safe for me to set this property to false in script?

Regards
Caesar

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 28 Dec 2011, 03:00 PM
Hello Rikard,

Your observations are absolutely true as well as the code you have found. However, this behavior is expected and intentional. When you move an HTML object on a page and there is an IFRAME on that page, it is possible that the cursor go into the IFRAME (for example when you move / resize the object too fast). If this happens, the IFRAME will consume the cursor events (because there is a separate document with events model inside it), which will lead to problems with the resize / movement of the object (that you are handling) on the main page - the logic would simply "not know" when the moving / resizing is finished.

Because of this problem, we intentionally hide all IFRAMEs on the parent page when we move / resize RadWindow. Removing this will result in inconsistent behavior and problems (objects not properly resized / moved) in your real-life application.

I hope that my reply is detailed enough and helpful, let me know if you have further questions.

Greetings,
Svetlina Anati
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Caesar
Top achievements
Rank 1
answered on 29 Dec 2011, 08:14 AM
Hi,

I can understand that this problem should happen when using non-modal windows, but we are only using modal windows so your ModalOverLay is always above all our iframes. Have tested to move around the windows really fast, but all works like a charm...
Will probably go for this solution, but we will test this throughly in all kind of bad browsers...

Regards
Caesar
0
Svetlina Anati
Telerik team
answered on 03 Jan 2012, 01:21 PM
Hi Rikard,

If this works for your particular case you can indeed override the hiding of the iframes. However, there are still scenarios (e.g a modal window in a restriction zone) when if the user makes an invalid drag and goes over an iframe, the issue will occur and we want also to keep backwards compatibility. That is why we do not plan to change this behavior internally in case of modality. We could, however, consider implementing a server property (whose default value will keep the current behavior) to control this in the future, depending on customers feedback. 

Thank you for your feedback, we appreciate it and we will be glad to receive it in future, too!

All the best,
Svetlina Anati
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Window
Asked by
Caesar
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Caesar
Top achievements
Rank 1
Share this question
or