Completed
Last Updated: 19 Jan 2016 15:28 by ADMIN
ADMIN
Marin Bratanov
Created on: 06 Nov 2015 07:25
Category: Rating
Type: Bug Report
0
Disabled RadRating should not get focus
RadRating has anchor elements in its default rendering and they can still be focused via the Tab key even if the control is disabled.
Since the disabled attribute is not valid for anchor tags, they can have tabIndex set to -1 to prevent keyboard focus.
Here is a small sample that shows how you can achieve this:

			<asp:TextBox ID="Textbox1" runat="server" />
			<telerik:RadRating runat="server" ID="RadRating1" Enabled="false" OnClientLoad="OnClientLoad">
			</telerik:RadRating>
			<script>
				function OnClientLoad(sender, args) {
					if (!sender.get_enabled()) {
						var anchors = sender.get_element().getElementsByTagName("a");
						for (var i = 0; i < anchors.length; i++) {
							anchors[i].setAttribute("tabIndex", "-1");
						}
					}
				}
			</script>
0 comments