Completed
Last Updated: 08 Dec 2016 15:07 by Jeff
ADMIN
Danail Vasilev
Created on: 10 May 2014 09:45
Category: FormDecorator
Type: Bug Report
1
FIX opening dialog with jQuery UI version 1.10.4 when RadFormDecorator is present on page
For the time being you can use the following JavaScript workaround:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
	<title></title>
	<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
	<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
</head>
<body>
	<form id="form1" runat="server">
		<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
		</telerik:RadScriptManager>
		<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
		<script>
			//Workaround:
			var removeCssClass = Sys.UI.DomElement.removeCssClass;
			Telerik.Web.UI.RadFormDecorator.prototype.set_elementDisabled = function (element, val) {
				var actor = element;
				var nextSibling = element.nextSibling;
				var type = element.type;

				if ((type == "checkbox" || type == "radio") && nextSibling && nextSibling.tagName == "LABEL") {
					actor = nextSibling;
				}
				else if (type == "button" || type == "reset" || type == "submit" || element.tagName == "BUTTON") {
					var parent = element.parentNode;
					if (parent && parent.tagName == "A") {
						actor = parent;
						parent.disabled = val;
					}
				}
				if (val) addCssClass(actor, "rfdInputDisabled");
				else removeCssClass(actor, "rfdInputDisabled");
				try {
					if (!val && $telerik.isIE && actor.parentNode.disabled) {
						actor.parentNode.disabled = val;
					}
				} catch (e) {
				}
			}
		</script>
		<input type="button" value="Test" onclick="Run(); return false;" />
		<div id="TestDiv" style="display: none"></div>
		<script type="text/javascript">
			function Run() {
				$('#TestDiv').dialog({
					modal: true,
					buttons: { "OK": function () { alert('bye'); } }
				});
			}
		</script>
	</form>
</body>
</html>
2 comments
Jeff
Posted on: 22 Dec 2015 20:22
I'm using version 2015.3.930.45 and ran into this error using Jquery 1.11

The workaround does fix it
Khushboo
Posted on: 17 Aug 2015 07:33
Hello,

Has this issue been fixed in "2015.2.729.45" version of Telerik API? Currently, we are able to reproduce same issue in this version. If not, shall we use same fix as above to get over this issue?

Thanks,
Khushboo