A function that is attached to this event is triggered on clicking the RadWindow's toolbar, even if it is already active.
The Window will not open in the center of the screen if it was already opened once and the page has been scrolled. It seems that the Window keeps opening at the same position initially was opened, hence it could open out of screen bounds.
Code
<style>
.mydiv {
margin: 2000px 100px;
}
</style>
<telerik:RadWindow ID="RadWindow1" runat="server">
<ContentTemplate>
<h3>RadWindow1 Content</h3>
</ContentTemplate>
</telerik:RadWindow>
<script>
function ShowEditForm(sender, args) {
var wnd = $find("<%= RadWindow1.ClientID %>");
wnd.show();
}
Sys.Application.add_load(function () {
setTimeout(function () {
$telerik.$('.mydiv')[0].scrollIntoView();
}, 100)
});
</script>
<div class="mydiv">
<telerik:RadButton runat="server" ID="RadButton1" Text="OpenWindow" AutoPostBack="false" OnClientClicked="ShowEditForm" />
</div>
Test Environment:
OS: Windows_11URL: https://demos.telerik.com/aspnet-ajax/window/examples/windowmanager/defaultcs.aspx
Repro Steps:
Actual Behavior:
Focus comes out of 'delete' popup without closing it automatically.
Expected Behavior:
When opening the 'delete pop-up', focus is expected to move to delete pop-up controls and focus should not leave the pop-up until it is closed. When a pop-up is opened, focus should move into that item and when it is closed, focus should return to the same control that opened it. In addition, focus should be confined to the window until the user closes it with an action, such as the close button or the ‘ESC’ key.
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.
Move the dialog after scrolling to the bottom and its content scrolls either a bit, or to the top (depending on the used browser). The scroll position must be preserved and unchanged by the RadWindow control, regardless of the circumstances
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; };
A simple workaround is to add the needed border via CSS: .RadWindow.rwNoTitleBar { padding-top: 0.5em; }
The following CSS will override the built-in rules to improve the icons positioning: div.RadWindow_Glow .rwTable .rwTitlebarControls .rwIcon { margin: 3px 5px 0 0; } div.RadWindow_Silk .rwTable .rwTitlebarControls .rwIcon { margin: 2px 5px 0 0; } div.RadWindow_Bootstrap .rwTable .rwTitlebarControls .rwIcon { margin: 6px 5px 0 0; }
Workaround in OnClientBeforeClose (commented):
<telerik:RadWindowManager RenderMode="Lightweight" OnClientClose="OnClientClose"
OnClientBeforeClose="OnClientBeforeClose" Behaviors="Close, Move, Resize,Maximize"
ID="RadWindowManager" runat="server" Width="450" Height="400">
<Windows>
<telerik:RadWindow RenderMode="Lightweight" ID="RadWindow1" VisibleOnPageLoad="true"
Title="Wikipedia" _NavigateUrl="http://www.wikipedia.org" IconUrl="wikiFavicon.ico" runat="server">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<script type="text/javascript">
function OnClientBeforeClose(oWnd, args) {
//workaround:
//oWnd.get_popupElement().style.visibility = "hidden";
}
function OnClientClose(oWnd) {
debugger;
}
</script>
This iframe element has an empty html tag that can cause issues with the Section 508 validation. Also, the iframe is not used so it does not need to be present in the markup at all. The following script added to the OnClientShow event of the RadWindowManager can remove this iframe: function OnClientShow(sender, args) { if (!sender._isPredefined) return; //check if it is a predefined dialog var frame = $telerik.$("iframe", sender.get_popupElement()); frame.remove(); }
When a RadAlert or RadConfirm is shown without an image (the last argument to their call is an empty string),the radalert/rwAlertDialog and radconfirm/rwConfirmDialog classes go missing from the control's elements (the pairs are for the Classic and Lightweight render modes respectively). Since these classes are sometimes used to cascade and apply custom styling to this dialog, their removal may be unwanted. There are several ways to work around this: - keep the image, if suitable for your case (i.e., remove the last argument from the RadAlert() call). For example: RadWindowManager1.RadAlert(text, 330, 150, "", null); - use a blank, transparent image instead of no image. It could be 1 transparent pixel (attached here). - place the desired style inline in the template. Here is an example for the Lightweight mode: <AlertTemplate> <div class="rwDialog rwAlertDialog"> <div class="rwDialogContent"> <div class="rwDialogMessage" style="font-size: 30px;"> {1} </div> </div> <div class="rwDialogButtons"> <input type="button" value="OK" class="rwOkBtn" onclick="$find('{0}').close(true); return false;" /> </div> </div> </AlertTemplate> - change the cascade to also affect the other two types of predefined dialogs. For example .rwDialogText, .rwDialogMessage { font-size: 30px; } - use a RadNotification to show the message instead: http://demos.telerik.com/aspnet-ajax/notification/examples/servershowwithnewtext/defaultcs.aspx.
Currently when external content is loaded in RadWindow, scollbars appear in the content and the control is dragged, the position of the scrollbars will be reset in IE10. The attached sample demonstrates a workaround for this issue.
When using DOCTYPE //W3C//DTD XHTML 1.0 Strict//EN and setting height to 100px RadWindow AutoResize=True gives problems in IE10 by adding unnecessary scrollbars, and in Chrome, FF and Safari the window is to high (approx. 55px too much). Refers to forum entry: http://www.telerik.com/community/forums/aspnet-ajax/window/autosize-behavior-question.aspx (I used the same sample project to replicate the problem). Please see attached screenshot and project.
The problem with adding such an overlay is that it cannot be transparent, or it will not work. If it is added, the content of the main page will be invisible behind a modal popup. It can be implemented via an additional property (that will default to false) should the effect be acceptable to the developer. Add a vote and/or a comment in favor or against such an option. A possible solution is setting the visibility CSS attribute of the embedded elements to hidden with a JavaScript function attached to the OnClientBeforeShow event of the RadWindow, and reverting it to its initial value with the OnClientClose hander. To ease these elements' collection they are going to use the shouldBeDisabled CSS class for this example: function OnClientBeforeShow(sender, args) { if (sender.isModal()) { var elements = $telerik.$(".shouldBeDisabled"); var arrLength = elements.length; var element; for (var i = 0; i < arrLength; i+=1) { element = elements[i]; element.style.visibility = "hidden"; } } } function OnClientClose(sender, args) { if (sender.isModal()) { var elements = $telerik.$(".shouldBeDisabled"); var arrLength = elements.length; var element; for (var i = 0; i < arrLength; i += 1) { element = elements[i]; element.style.visibility = "initial"; } } }
I have a radwindow which opens as a modal popup when a button is clicked, in the initial stages the rad window was able to be dragged towards right and bottom, of the screen, even out of the screen bounds, i managed to fix that by setting the KeepInScreenBounds="true" RestrictionZoneID="dvContainerMain", where "dvContainerMain" is the main div within which all the parent controls come but now when i resize the parent browser window to almost size less than radwindow size, rad window seems to behave weird, am not able to resize the radwindow even if the resize behavior is set Please let me know on this issue, seems like there is a bug when the RestrictionZoneID width is less than or close to the radwindow size Thanks Tony Thomas
When using Telerik controls with Bootstrap theme and Bootstrap 3.x the radWindow title has cosmetic issue (see attached).
It appeared that Bootstrap global box-sizing: border-box is the reason.
Repro markup:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" />
<telerik:RadWindow Skin="Bootstrap" ID="RadWindow1" runat="server" Title="Some RadWindow title" VisibleOnPageLoad="true" RenderMode="Lightweight">
<ContentTemplate>adadsa</ContentTemplate>
</telerik:RadWindow>
</form>
</body>
</html>
Bootstrap skin
Silk skin
The workaround is to set box-sizing: content-box in rwTitleWrapper:
<style>
.rwTitleWrapper
{
box-sizing: content-box !important;
}
</style>
When I try to close the RadWindow on mobile (Chrome Mobile, Chrome Mobile desktop emulator) by clicking on the default Close button (aka X button), if I have a clickable element behind the X button, this one also grabs the input and triggers the OnClick event of the behind element. The problem can be reproduced in the following demo http://demos.telerik.com/aspnet-ajax/window/examples/radopen/defaultcs.aspx. Workaround: <script> function OnClientShow(sender, args) { $telerik.$(".rwCloseButton").bind("touchstart", function (e) { $telerik.cancelRawEvent(e); }); } </script> <telerik:RadWindow OnClientBeforeShow="OnClientShow" RenderMode="Lightweight" ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="400px" Height="400px" Title="Telerik RadWindow" Behaviors="Default"> </telerik:RadWindow>
This issue seems fixed for AzureAD while it is not for WSFederation authentication
It seems the final solution is to manually remove the entries with null/empty key from the submitted form