Won't Fix
Last Updated: 25 Apr 2017 13:28 by ADMIN
ADMIN
Anton
Created on: 28 Oct 2016 08:08
Category: UI for ASP.NET AJAX
Type: Bug Report
1
ComboBox' OnClientBlur not working correctly
The issue can be workarounded by calling preventDefault of the mousedown event when ComboBox item is clicked:
<telerik:RadScriptManager runat="server" />
<script>
	var onDocumentClick = Telerik.Web.UI.RadComboBox.prototype._onDocumentClick;
	Telerik.Web.UI.RadComboBox.prototype._onDocumentClick = function (e) {
		if (!e) e = event;

		var target = e.target || e.srcElement;

		while (target.nodeType !== 9) {
			if (!target.parentNode || target == this.get_element() || target == this.get_dropDownElement()) {
				e.preventDefault();
				return;
			}

			target = target.parentNode;
		}
		onDocumentClick.call(this, e);
	};
</script>

<telerik:RadComboBox ID="RadComboBox1" runat="server" RenderMode="Lightweight" OnClientBlur="OnClientBlur"
	CheckBoxes="true">
	<Items>
		<telerik:RadComboBoxItem Text="Item1" Value="1" />
		<telerik:RadComboBoxItem Text="Item2" Value="2" />
		<telerik:RadComboBoxItem Text="Item3" Value="3" />
		<telerik:RadComboBoxItem Text="Item4" Value="4" />
	</Items>
</telerik:RadComboBox>

<script>
	function OnClientBlur(sender, args) {
		console.log("Blur event");
	}
</script>
1 comment
ADMIN
Nikolay
Posted on: 25 Apr 2017 13:27
The problem has low demand and the fix is likely to introduce regression issues.