Last Updated: 03 Nov 2020 10:19 by ADMIN
Marin Bratanov
Created on: 19 Apr 2017 10:44
Category: Window
Type: Feature Request
Hide iframes to improve resizing and moving behavior when RenderMode=Lightweight
The Classic RenderMode hides all iframes on the page when the user starts moving or resizing the RadWindow.

This prevents them from consuming the mouse events and thus ensures proper behavior, but hides content from the user which is unexpected. You can find attached below an illustration of the issue.

Due to numerous requests about changing this, the Lightweight mode does not hide the iframes. Thus in some cases, if the browser had not redrawn the RadWindow fast enough, the mouse events may get captured by another iframe.

Cast your vote whether you want the Lightweight mode to do this as well.

You can change this by using the following script (the second instance has the necessary handlers attached, in a real app you can do that via the RadWindowManager, or via an ASP Theme)

		<telerik:RadWindow runat="server" ID="rw1" VisibleOnPageLoad="true" NavigateUrl="Default2.aspx" RenderMode="Lightweight"></telerik:RadWindow>
		<telerik:RadWindow runat="server" ID="rw2" VisibleOnPageLoad="true" NavigateUrl="Default3.aspx" RenderMode="Lightweight"
			OnClientDragStart="hideFrames" OnClientResizeStart="hideFrames" OnClientDragEnd="showFrames" OnClientResizeEnd="showFrames">
			function hideFrames(sender, args) {
				setIframesVisible(false, sender);
			function showFrames(sender, args) {
				setIframesVisible(true, sender);
			function setIframesVisible(bVisible, wnd) {
				var iframes = document.getElementsByTagName("iframe");
				var iframeToSkip = wnd.get_contentFrame();
				for (var i = 0, length = iframes.length; i < length; i++) {
					var frame = iframes[i];
					if (iframeToSkip && (iframeToSkip === frame || iframeToSkip == frame))//compare through == and === because of FF 3.5 and 3.6
						iframeToSkip = null;
					else {
						frame.style.visibility = bVisible ? "" : "hidden";

						//For some extremely strange reason in IE the iframe does not get hidden properly and continues to consume mouse events
						if ($telerik.isIE)
							try {
								frame.contentWindow.document.body.style.visibility = bVisible ? "" : "hidden";
							} catch (ex) {
Attached Files: