Reason for hiding other iframes when moving window?

4 posts, 0 answers
  1. Caesar
    Caesar avatar
    59 posts
    Member since:
    Aug 2008

    Posted 28 Dec 2011 Link to this post

    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
  2. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 28 Dec 2011 Link to this post

    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
  3. Caesar
    Caesar avatar
    59 posts
    Member since:
    Aug 2008

    Posted 29 Dec 2011 Link to this post

    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
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 03 Jan 2012 Link to this post

    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
Back to Top