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

Editor contents disappear when RadWindow opens over it

3 Answers 83 Views
Editor
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 2
George asked on 05 May 2016, 04:08 PM

I have a page with a RadEditor on it.  I have a test button that posts causing a model RadWindow to open over the RadEditor. When the page refreshes, the editor gets its text but then disappears when the RadWindow opens over it. The RadEditor text reappears when the RadWindow is closed.

The test window is open from a javascript function that is initiated by code.

Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenTest", "<script type='text/javascript'>Sys.Application.add_load(OpenTestWindow);</script>");

OpenTestWindow is

function OpenTestWindow() {
    Sys.Application.remove_load(OpenTestWindow);

    setTimeout(function () {

        var browserWidth = $telerik.$(window).width();
        var browserHeight = $telerik.$(window).height();

        var oWnd = GetRadWindow();
        console.log("oWnd " + oWnd);
        oWnd.Visible = true;
        oWnd.show();
        oWnd.setSize(Math.ceil(browserWidth * 80 / 100), Math.ceil(browserHeight * 80 / 100));
        oWnd.center();

    }, 300);
}
    function GetRadWindow()
    {
        var manager = $find("<%= RadWindowManagerMessages.ClientID %>");
        return manager.open(null, "TestWindow");
    }

I need to be able to look at the editor contents while the RadWindow is open.

This is a very strange problem

 

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 10 May 2016, 08:33 AM
Hi George,

I created a sample page to test that, but I was unable to encounter issues with RadEditor content. It is shown behind the modal overlay. 

You can find the test page attached to examine it and see if I am missing something. 

Regards,
Ianko
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
George
Top achievements
Rank 2
answered on 10 May 2016, 03:26 PM

I updated to a new Telerik AJAX ASP.NET build and the problem is mostly fixed.  There is a strange thing where the contents of the RadEditor disappear if you move the model window (actually click on the title bar). Happens on all three of my RadWindows.

My configuration uses 3 RadWindows so the need to e grouped in a RadWindowManager which could be a difference.

0
Ianko
Telerik team
answered on 11 May 2016, 08:47 AM
Hello George,

When RadWindow is being dragged/moved it is expected the content area to hide itself. This is a prevention of a browser behavior. Typically, when dragging DOM elements (like RadWindow) browser enables end user to drop this DOM element in content editable areas (like the content area of RadEditor).

Therefore, to overcome this unwanted behavior and prevent outside DOM elements to get into the HTML of the content area, when RadWindow is being moved around, the iframe element hides itself.  

I have tested with RadWindowManager, but still I was unable to encounter the described situation. Apart the one related to moving the RadWindow. 

I suggest you to try and isolate the case in the sent example and attach it to your message in order to examine the exact scenario that is on your end. 

Regards,
Ianko
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Editor
Asked by
George
Top achievements
Rank 2
Answers by
Ianko
Telerik team
George
Top achievements
Rank 2
Share this question
or