Completed
Last Updated: 29 Sep 2014 12:30 by ADMIN
ADMIN
Created by: Marin Bratanov
Comments: 1
Category: Window
Type: Bug Report
24
Currently a page loaded through HTTPS will throw a warning that unsecure content is loaded if the IconUrl of the RadWindow is set with a relative path. This happens because the framework sets the URL without regard for the protocol. A workaround is to always use full urls (e.g. https://mysite.com/images/myIcon.jpg).

If possible, RadWindow should check the protocol and fix the URL so that such warnings are not shown.
Completed
Last Updated: 16 Sep 2019 13:59 by ADMIN
In recent versions of Chrome (76.0.38...) we are experiencing an issue when we display a popup using ShowContentDuringLoad="false". The content goes out of bounds of the window. When that flag is true, the window displays as expected. I tried this using Telerik version 2019.2.514.45.



We've been using Telerik controls for some time and I am aware of the minimum frame height limit imposed by the browser but in this case it does not matter if the window height is 200px or 400px, we are still seeing the same issue.


We are using classic mode for Telerik controls.
 

See the attached zip for an example project and also a screenshot of what we are seeing.

If I remove the height from the frame in pageLoad() in javascript it displays OK.

oWindow.GetContentFrame().style.height = ""

 
I can't seem to override using a CSS style, I think the window is using what is stored in cssText.

oWindow.GetContentFrame().style.cssText = "width: 100%; height: 100%; border: 0px; position: absolute; top: -10000px;"


Can you please investigate and fix in Chrome. I would also like to see if you can provide a CSS style work around.

I've tried all sorts of style overrides and cannot seem to find one that works. It looks like whatever is specified in cssText is

what is used for the height.

 
Thanks for your help,
Completed
Last Updated: 05 Jul 2013 12:52 by ADMIN
If the content page has a title RadWindow should set it for its own title, unless its Title property has been set explicitly.

Since Q2 2013, when ShowContentDuringLoad=true (which is the default value) this does not happen.

The second workaround is using the OnClientPageLoad event:
			function OnClientPageLoad(sender)
			{
				try
				{
					var pageTitle = sender.get_contentFrame().contentWindow.document.title;
					sender.set_title(sender.get_title() == "" ? pageTitle : sender.get_title());
				}
				catch (err)
				{

				}
			}
The try-catch block is used to catch errors in case the page is from another domain and the JavaScript same-origin policy is in effect.

The event handler can also be attached to the RadWindow manager so that it will be used for all its RadWindows.
Completed
Last Updated: 23 Nov 2015 10:52 by ADMIN
There are several ways to work around this:
1) disable autosizing (set AutoSize to false)
2) move the RadWindow after autoziging finishes (see attached example for a demo):
			function OnClientAutoSizeEnd(sender, args)
			{
				var wndBounds = sender.getWindowBounds();
				//this is the case when the viewport is not sufficient for the RadWindow
				//so the RadWindow is as tall as the viewport
				if (wndBounds.height == $telerik.getClientBounds().height)
				{
					sender.moveTo(wndBounds.x - 9);
				}
			}

3) avoid autosizing for the subsequent page loads in the content page.
This can be done by setting AutoSize to false and additionally the following function attached to the OnClientPageLoad event will provide autosizing for the first load without positioning issues:
 			function OnClientPageLoad(sender, args)
			{
				if (!sender.hasBeenShown)
				{
					sender.autoSize(false);
					sender.hasBeenShown = true;
				}
			}

4)  use partial postbacks in the content page so that it is not fully reloaded and the autosizing logic is not fired again automatically.
Completed
Last Updated: 28 Aug 2014 11:33 by ADMIN
If you have multiple RadWindows opened only one has an active state (brigter colors for one). Closing it should activate the next one, so it is visually distinguishable, like MS Windows does. This should be the dialog that was either last opened, or was the last one active.
With Lightweight RenderMode this does not happen and the other dialog remains in its inactive state.

You can use the OnClientClose event to invoke the logic that activates the previous one:
			<telerik:RadWindow ID="MainWindow" runat="server" Modal="true" VisibleOnPageLoad="true" OnClientClose="activatePreviousWindow" RenderMode="Lightweight">
				<ContentTemplate>
					<telerik:RadButton ID="radbtnOpenWin" runat="server" Text="Open Window" AutoPostBack="false"
									   OnClientClicked="OpenWindow">
					</telerik:RadButton>
				</ContentTemplate>
			</telerik:RadWindow>
			<telerik:RadWindow ID="ChildWindow" runat="server" Modal="true" OnClientClose="activatePreviousWindow" RenderMode="Lightweight">
				<ContentTemplate>
					Child Window
				</ContentTemplate>
			</telerik:RadWindow>
			<script type="text/javascript">
				function activatePreviousWindow(sender, args) {
					setTimeout(function () {
						sender._getWindowController().notifyWindowClosed(sender);
					});
				}
				
				function OpenWindow(sender, args) {
					var window = $find("<%=ChildWindow.ClientID%>");
					window.show();
				}
			</script>
Completed
Last Updated: 06 Mar 2017 14:34 by ADMIN
Error message: Unable to get property '_handlesCollection' of undefined or null reference
when RenderMode=Lightweight

Workarounds:
- enable the default behaviors to enable the Resize (and thus- maximize0 functionality, restore behaviors later:
				function OpenForm(sender, args) {
					var oWnd = radopen(null, "existing");
					var currBehaviors = oWnd.get_behaviors();
					oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Default);
					if (!oWnd.isMaximized()) {
						oWnd.maximize();
					}
					oWnd.set_behaviors(currBehaviors);
					
				}
- OR, have the Behaviors property contain either of the Maximize or Resize behavior. Or use the Default value

			<telerik:RadWindowManager runat="server" ID="rwm1">
				<Windows>
					<telerik:RadWindow runat="server" ID="existing" Behaviors="Close, Resize">
					</telerik:RadWindow>
				</Windows>
			</telerik:RadWindowManager>

			<telerik:RadButton ID="Button5" Text="open existing rw from rwm 3" AutoPostBack="false" OnClientClicked="OpenForm" runat="server"></telerik:RadButton>

			<script>
				function OpenForm(sender, args) {
					var oWnd = radopen(null, "existing");
					
					
				}
				function OnClientShow(sender, args) {
					if (!sender.isMaximized()) {
						sender.maximize();
					}
				}
			</script>
Completed
Last Updated: 22 Jun 2022 10:33 by ADMIN
When the input inside RadWindow is focused the on-screen keyboard is shown, the page is scrolled so the input is into view above the keyboard and then the keyboard hides automatically. This is caused by using a RestrictionZone. Remove this property to avoid the behavior.
Completed
Last Updated: 20 Oct 2015 09:46 by ADMIN
There are three possible workarounds until an official fix is available

- use RenderMode=Classic


- add a check for the object fields in the handler, in every handler

			function theCloseEventsHandler(sender, args) {
				var arg = args.get_argument();
				if (arg.target && arg.which) { //it is the mouse event
					arg = null;
				}
				alert(arg);
			}


- add the check by overriding the built-in function of the dialog. Place the following script at the end of the page that hosts the RadWindows:

			var oldClose = Telerik.Web.UI.RadWindow.prototype.close;
			Telerik.Web.UI.RadWindow.prototype.close = function (arguments) {
				if (arguments.target && arguments.which) { //it is the mouse event
					arguments = null;
				}
				var _oldClose = Function.createDelegate(this, oldClose);
				_oldClose(arguments);
			}
Completed
Last Updated: 22 Oct 2015 06:07 by ADMIN
There are two possible workarounds:

- use RenderMode=Classic
- OR, add a CSS class to the dialog and a simple CSS rule to remove the built-in font icon:
			div.withCustomIcon .rwIcon:before
			{
				content: "";
			}

			<telerik:RadWindow ID="RadWindow1" runat="server" CssClass="withCustomIcon" IconUrl="~/images/icon_16x16.png" VisibleOnPageLoad="true" RenderMode="Lightweight"></telerik:RadWindow>
Completed
Last Updated: 08 Sep 2015 07:43 by ADMIN
At present, RadWindows do not have a z-index during animations so they may get hidden behind other elements on the page.
The animation should be performed with the final z-index being already set to the RadWindow's popup element.
Completed
Last Updated: 27 Jun 2016 08:45 by Tonino
This is related to a browser bug in accessing the document.activeElement property inside an iframe under IE9 and IE10.

See this KB article for additional information and examples: http://www.telerik.com/support/kb/aspnet-ajax/window/modal-radwindow-in-radwindow-in-ie9-and-ie10.aspx .

There are several possible workarounds:
1) remove the Modal feature.
2) Replace the opening logic with the one from this thread ( http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx ) and add a small timeout before showing the RadWindow. Even 0ms could suffice so the browser has an active element
3) Replace the RadAjaxPanel with an ASP UpdatePanel with UpdateMode set to Conditional
4) Add a function that will provide a focused element and call it in the OnClientBeforeShow event of the RadWindow
5) Add that function and call it in the ResponseScripts of the RadAjaxPanel
 The function could look like this: function fixIE() { document.documentElement.focus();} where, of course, you can focus some other element on the page.

A sample is attached.
Completed
Last Updated: 08 Jun 2016 14:53 by ADMIN
Currently the video does not play, only audio is heard. If autosizing is disabled the video functions properly.
A possible workaround is to disable autosizing and manually call the autosize() method when the page is loaded for all other browsers:

<telerik:RadWindow runat="server" ID="rw1" VisibleOnPageLoad="true" NavigateUrl="PlayVideo.aspx"
    AutoSize="false" Width="700" Height="500" OnClientPageLoad="OnClientPageLoad">
</telerik:RadWindow>

 and

function OnClientPageLoad(sender, args)
{
    setTimeout(function ()
    {
        if (!$telerik.isMobileSafari)
        {
            sender.autoSize(false);
        }
    }, 0);
}
Completed
Last Updated: 12 Mar 2016 15:20 by ADMIN
For the time being you can use the following CSS workaround:
	<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
		<style>
		html .RadWindow_Bootstrap.rwLoading .rwExternalContent {
			background-image: url('	<%= Telerik.Web.SkinRegistrar.GetWebResourceUrl(this, typeof(RadWindow), "Telerik.Web.UI.Skins.Bootstrap.Common.loading.gif") %>')
		}
	</style>
	</telerik:RadCodeBlock>
Completed
Last Updated: 20 Jun 2022 14:57 by ADMIN
Here is a script override that can help:

Telerik.Web.UI.Widgets.Draggable.prototype._calcConstraints = function (delta, position, constraints)
        {
            var $ = $telerik.$;
 
            var result = delta;
            //CHANGED THIS **********************************************************************************************************
            //Otherwise window can't be moved all the way to the right or bottom of screen
            //var elementWidth = this._element.offsetWidth;
            //var elementHeight = this._element.offsetHeight;
            var elementWidth = $(this._element).width();
            var elementHeight = $(this._element).height();
            //**********************************************************************************************************************
             
            if ((constraints.maxX != null && position.x + elementWidth > constraints.maxX) ||
                (constraints.minX != null && position.x < constraints.minX) ||
                (constraints.maxY != null && position.y + elementHeight > constraints.maxY) ||
                (constraints.minY != null && position.y < constraints.minY)
                )
                return { x: 0, y: 0 };
 
            if (delta.x < 0)
                result.x = constraints.minX !== null && !isNaN(constraints.minX) ?
                    Math.max(delta.x, constraints.minX - position.x) :
                    delta.x;
            else
                result.x = constraints.maxX !== null && !isNaN(constraints.maxX) ?
                    Math.min(delta.x, constraints.maxX - position.x - elementWidth) :
                    delta.x;
 
            if (delta.y < 0)
                result.y = constraints.minY !== null && !isNaN(constraints.minY) ?
                    Math.max(delta.y, constraints.minY - position.y) :
                    delta.y;
            else
                result.y = constraints.maxY !== null && !isNaN(constraints.maxY) ?
                    Math.min(delta.y, constraints.maxY - position.y - elementHeight) :
                    delta.y;
 
            return result;
        };
Completed
Last Updated: 24 Jul 2013 07:58 by ADMIN
Possible workarounds:
1) the following CSS rule:
		.rwExternalContent iframe
		{
			height: 100%;
		}

OR

2) some JavaScript attached to the OnClientPageLoad event of the control:
			function OnClientPageLoad(sender)
			{
				sender.get_contentFrame().style.height = "100%";
			}
Completed
Last Updated: 06 Jul 2018 11:55 by Informat
ADMIN
Created by: Vessy
Comments: 1
Category: Window
Type: Bug Report
1
Each time a window is re-opened its size is decreased with several pixels.

video: https://www.screencast.com/t/kxVyE0U2

Steps to reproduce:
1. Open http://demos.telerik.com/aspnet-ajax/window/examples/modalpopup/defaultcs.aspx
2. Close and re-open RadWindow multiple times

Result: The window's height is decreased each time.

Recommended Workaround: Apply the following CSS class to the page with RadWindow (***  Updated on 22 Jan 2018 ***)

<style>
	.RadWindow {
		padding: 0 6px 6px !important;
	}
</style>


Optional Workaround: Manually resize the Window at the stage of opening it. This example is re-using the width and height set in the markup.

JavaScript
<script>
	function openFixedSize(sender, args) {
		var oWindow = radopen("WindowContent.aspx", "RadWindow1");
		oWindow.__oWidth = oWindow.__oWidth ? oWindow.__oWidth : oWindow.get_width();
		oWindow.__oHeight = oWindow.__oHeight ? oWindow.__oHeight : oWindow.get_height();
		oWindow.setSize(oWindow.__oWidth, oWindow.__oHeight);
	}
</script>

Markup
<telerik:RadButton ID="RadButton1" runat="server" Text="Open - Custom" AutoPostBack="false" OnClientClicked="openFixedSize"></telerik:RadButton>

<telerik:RadWindowManager RenderMode="Lightweight" ID="RadWindowManager1" runat="server">
	<Windows>
		<telerik:RadWindow RenderMode="Lightweight" ID="RadWindow1" runat="server" Title="" Height="500px"
			Width="500px" Left="1px" Top="1px" ReloadOnShow="true" ShowContentDuringLoad="false" Behaviors="None"
			Modal="true" ShowOnTopWhenMaximized="True" VisibleStatusbar="False" VisibleTitlebar="false">
		</telerik:RadWindow>
	</Windows>
</telerik:RadWindowManager>
Completed
Last Updated: 29 Jul 2015 06:55 by ADMIN
For the time being you can use the following workaround:

		<telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="telerik_new-logo_thumb.png" VisibleOnPageLoad="true" RenderMode="Lightweight"></telerik:RadWindow>
		<script>
			var $W = Telerik.Web.UI.Window;
			$W.LightweightRenderer.prototype.createUI = function () {
				if (this.container) return;
				var wnd = this.window;
				var isRtl = wnd._isWindowRightToLeft();
				var addCssClass = Sys.UI.DomElement.addCssClass;

				var container = document.createElement("div");
				this._appendToDom(container);
				this.container = wnd._popupElement = container;
				container.id = "RadWindowWrapper_" + wnd.get_id();

				container.className = this._getSkinCssClass();
				var customCssClass = wnd.get_cssClass();
				if (customCssClass)
					addCssClass(container, customCssClass);
				if (isRtl)
					addCssClass(container, "rwRtl");
				if (!wnd._visibleTitlebar)
					addCssClass(container, "rwNoTitleBar");

				this.setShadowCssClass(wnd._enableShadow);

				container.setAttribute("unselectable", "on");

				var containerStyle = container.style;
				containerStyle.width = wnd._width;
				containerStyle.height = wnd._height;
				containerStyle.position = "absolute";

				var titlebar = this.titlebar = wnd._titlebarElement = document.createElement("div");
				titlebar.className = "rwTitleBar";
				container.appendChild(titlebar);

				var titleWrap = document.createElement("div");
				titleWrap.className = "rwTitleWrapper";
				titlebar.appendChild(titleWrap);

				titleWrap.appendChild(this.getIconNode());
				titleWrap.appendChild(this.getTitleNode());
				wnd.set_title(wnd._title);
				titleWrap.appendChild(this.getTitleCommandsContainer());

				wnd._registerTitlebarHandlers(true);
				wnd.set_iconUrl(wnd.get_iconUrl());

				var content = this.content = $get(wnd.get_id() + "_C") || this.pendingContent || document.createElement("div");
				if (content) {
					content.style.display = "none";
					content.className = "rwContent";
					this.setContent(content);
				}

				if (!wnd._dockMode) {
					var contentFrames = content.getElementsByTagName("iframe");
					//Create content IFRAME. Due to a bug in IE regarding setting the name attribute, the following ugly code needs to be used
					var frame = contentFrames.length > 0 ?
									contentFrames[0] :
									document.createElement(($telerik.isIE && !$telerik.isIE9Mode) ? "<iframe name='" + name + "'>" : "iframe");

					var name = this.window.get_name();

					frame.name = name;
					/*jshint scripturl:true*/
					frame.src = "javascript:'<html></html>';";
					frame.style.width = "100%";
					frame.style.height = "100%";
					frame.style.border = "0px"; //set to 0
					frame.frameBorder = "0";

					//Only under IE8 it is necessary to set display = "block" for the IFRAME - otherwise it will not occupy 100% of its parent element
					if ($telerik.isIE8)
						frame.style.display = "block";

					this.contentFrame = wnd._iframe = frame;

					//FIX for IFRAME overflowing outside the RadWindow under mobile device
					if (($telerik.isMobileSafari || wnd._isiPhoneiPadAppleWebkit) && !wnd._isPredefined) {
						var iframeWrapper = document.createElement('div');
						$(iframeWrapper).addClass('rwIframeWrapperIOS');
						iframeWrapper.appendChild(this.contentFrame);
						this.content.appendChild(iframeWrapper);
						//in iOS5 having a wrapper with only overflow hidden does not resolve the frame height problem
						//we need to have explicit pixel height for that wrapper as well !!!
						if (wnd._isiOS5Safari) wnd.setContentFixedHeight(wnd.get_height(), iframeWrapper);
						wnd._iframeWrapper = iframeWrapper;
					} else {
						this.content.appendChild(this.contentFrame);
					}

					Sys.UI.DomElement.addCssClass(this.content, "rwExternalContent");

					//Create a back reference to parent RadWindow
					wnd._createBackReference();
				}

				if (wnd._visibleStatusbar) {
					var statusbar = this.statusbar = document.createElement("div");
					statusbar.className = "rwStatusBar";
					container.appendChild(statusbar);

					statusbar.appendChild(this.getStatusMessageNode());
					if (wnd.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize))
						statusbar.appendChild(this.createStatusbarResizer());
				}


				wnd._addWindowToDocument();

				if (!$telerik.isTouchDevice) //fix various issues with the control when hardware acceleration is enabled with CSS
				{
					this.container.style["Transform"] = "none";
					this.container.style["BackfaceVisibility"] = "visible";
					this.container.style["webkitTransform"] = "none";
					this.container.style["webkitBackfaceVisibility"] = "visible";
					this.container.style["OTransform"] = "none";
					this.container.style["OBackfaceVisibility"] = "visible";
					this.container.style["MozTransform"] = "none";
					this.container.style["MozBackfaceVisibility"] = "visible";
					this.container.style["msTransform"] = "none";
					this.container.style["msBackfaceVisibility"] = "visible";
				}

				//Create the popup if it has not been created
				if (!wnd._popupBehavior) {
					//Set behaviors (move, resize,etc etc) - do it here, so that the IFRAME is created and can be passed to be skipped
					//should be done only once!
					wnd.set_behaviors(wnd._behaviors);
					this.popupBehavior = wnd._popupBehavior = $create(Telerik.Web.PopupBehavior, {
						'id': ((new Date() - 100) + 'PopupBehavior'),
						'parentElement': null, 'overlay': wnd._overlay, 'keepInScreenBounds': wnd._keepInScreenBounds
					}, null, null, this.container);
				}

			};
		</script>
Completed
Last Updated: 11 Mar 2016 14:24 by ADMIN
Completed
Last Updated: 21 Apr 2017 14:10 by ADMIN
This is caused by <button> elements without a type attribute. Workarounds are

- add a JS function like this

Sys.Application.add_load(function () {
    // Add the "type=button" attribute to the RadWindow buttons so they don't try to submit the form.
    $("div.rwDialogButtons button").attr("type", "button");
});

 - OR, override the templates and add the attribute:

			<asp:TextBox ID="Textbox1" runat="server" />
			<telerik:RadWindowManager ID="rwm1" runat="server" RenderMode="Lightweight">
				<AlertTemplate>
					<div class="rwDialog rwAlertDialog">
						<div class="rwDialogContent">
							<div class="rwDialogMessage">{1}</div>
						</div>
						<div class="rwDialogButtons">
							<button type="button" class="rwOkBtn" onclick="$find('{0}').close(true); return false;">##LOC[OK]##</button>
						</div>
					</div>
				</AlertTemplate>
				<PromptTemplate>
					<div class="rwDialog rwPromptDialog">
						<div class="rwDialogContent">
							<div class="rwDialogMessage">{1}</div>
							<div class="rwPromptInputContainer">
								<script type="text/javascript">
									function RadWindowprompt_detectenter(id, ev, input) {
										if (!ev) ev = window.event;
										if (ev.keyCode == 13) {
											var but = input.parentNode.parentNode.parentNode.getElementsByTagName("button")[0];
											if (but) {
												if (but.click) {
													but.click();
												}
												else if (but.onclick) {
													but.focus();
													var click = but.onclick;
													but.onclick = null;
													if (click) click.call(but);
												}
											}
											return false;
										}
										else return true;
									}
								</script>
								<input title="Enter Value" onkeydown="return RadWindowprompt_detectenter('{0}', event, this);" type="text" class="rwPromptInput radPreventDecorate" value="{2}" />
							</div>
						</div>
						<div class="rwDialogButtons">
							<button type="button" class="rwOkBtn" onclick="$find('{0}').close(this.parentNode.parentNode.getElementsByTagName('input')[0].value); return false;">##LOC[OK]##</button>
							<button type="button" class="rwCancelBtn" onclick="$find('{0}').close(null); return false;">##LOC[Cancel]##</button>
						</div>
					</div>
				</PromptTemplate>
				<ConfirmTemplate>
					<div class="rwDialog rwConfirmDialog">
						<div class="rwDialogContent">
							<div class="rwDialogMessage">{1}</div>
						</div>
						<div class="rwDialogButtons">
							<button type="button" class="rwOkBtn" onclick="$find('{0}').close(true); return false;">##LOC[OK]##</button>
							<button type="button" class="rwCancelBtn" onclick="$find('{0}').close(false); return false;">##LOC[Cancel]##</button>
						</div>
					</div>
				</ConfirmTemplate>
			</telerik:RadWindowManager>
Completed
Last Updated: 10 May 2017 22:03 by Vasssek
To remove the built-in icon for the Lightweight mode, add the following CSS rules to your page:

			div.rwDialog.rwAlertDialog:before
			{
				content: "";
			}

			div.rwDialog.rwConfirmDialog:before
			{
				content: "";
			}
1 2 3 4