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

Recent Windows IE Security update appears to break the HTMLPlaceHolder when used with an ActiveX control

2 Answers 43 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 16 Apr 2013, 07:39 PM
I have a RadTabControl that has two tabs. The first contains a RadGridView, the second a RadHTMLPlaceHolder that directs to a page with an ActiveX control. If you switch to the tab with the HTMLPlaceHolder, the page loads, but if you switch back to the first tab the ActiveX control never hides and continues to float above the RadGridView. This used to work on both Windows 7 and 8 before installing this update http://support.microsoft.com/kb/2817183 , and works again when uninstalling said update. My guess is that it probably specifically relates to this article: http://support.microsoft.com/kb/2833068 which reads:

"Contents of an iFrame are not hidden when a Div's display style is set to "none" in Internet Explorer 10 in Windows 7 and Windows 8"

which seems to claim to fix the exact problem that is now occurring. Is it possible that you guys had a workaround for this issue that is now broken due to this fix from Microsoft?

We've had a ton of reports come in from customers since last Wednesday reporting this issue. Any help would be appreciated.

Thanks.




2 Answers, 1 is accepted

Sort by
0
Andrew
Top achievements
Rank 1
answered on 18 Apr 2013, 01:58 PM
My current workaround for this issue is to call ajavascript function on the page our silverlight app is sitting on:

function CloseIFrameContent(shouldClose, frameName) {
    var window = document.getElementById(frameName).contentWindow;
    if (window != null) {
        var doc = window.document;
        if (doc != null && doc.body != null) {
            if (shouldClose) {
                doc.body.style.display = "none";
            } else {
                doc.body.style.display = "block";
            }
        }
    }
}

This is called from silverlight in the RadTabControl's SelectionChanged event. It hides or shows the content of the IFrame. Obviously this solution will only work if the main page and iFrame are hosted on the same domain, otherwise you'd end up with XSS errors.
0
Pavel R. Pavlov
Telerik team
answered on 19 Apr 2013, 09:33 AM
Hi Andrew,

For best performance we recommend integrating the RadHtmlPlaceholder with our RadWindow control. For more information you can refer to this article.

Furthermore, you can subscribe to the SelectionChanged event of the RadTabControl and check the selected tab and show/hide the RadWindow accordingly. You can implement this approach like this:

public MainPage()
{
    InitializeComponent();
     
    w = new RadWindow();
    RadHtmlPlaceholder p = new RadHtmlPlaceholder();
    p.SourceUrl = new Uri("http://bing.com", UriKind.Absolute);
    w.Content = p;
}
 
RadWindow w;
private void xTab_SelectionChanged(object sender, RadSelectionChangedEventArgs e)
{
    if ((e.AddedItems[0] as RadTabItem).Header.ToString() == "MyTabName_1")
    {
        w.Show();
    }
    else
    {
        w.Close();
    }
}


Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
HTMLPlaceHolder
Asked by
Andrew
Top achievements
Rank 1
Answers by
Andrew
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or