Completed
Last Updated: 29 Nov 2017 15:41 by ADMIN
ADMIN
Marin Bratanov
Created on: 12 Jan 2015 13:49
Category: Window
Type: Bug Report
1
FIX Calling autoSize() removes the focus and sets it to the body of the main page in IE
You can work around this by storing the currently focused element before calling autoSize()
and then using the OnClientAutoSizeEnd event (http://www.telerik.com/help/aspnet-ajax/window-client-side-events-onclientautosizeend.html) to restore the focus.

//this goes in the content
function autoSizeWnd() {
	//code that manipulates the content so autosizing is needed
	var oWnd = getRadWindow();
	if ($telerik.isIE) { //assumes you have the Telerik core client-side libraries loaded (e.g., by having a Telerik control on this page). If you don't, you can skip the check or add them manually
		oWnd.__currActElem = document.activeElement;
	}
	oWnd.autoSize();
}


//this goes in the main page where the RadWindow is declared
function autoSizeEndHandler(sender, args) {
	setTimeout(function () {
		if (sender.__currActElem && sender.__currActElem.focus) {
			sender.__currActElem.focus();
		}
	}, 0);
}
0 comments