Browser:
Microsoft Edge 44.18362.449.0
Telerik Control:
RadCombobox
Teleri Version: Version=2017.3.913.45,
Issue:
When a item is selected and a postback is occured, the SelectedValue returns an empty string.
Expected behavior:
The correct SelectedValue should be return.
Thing that have been tried so far:
1: upgrade the telerik to the latest version (2020.114) ---> issue persists
2: set autopostback to "true" problem solved
3: use other browsers (chrome, FireFox, new Version 79.0.309.68 ) issue disappears
Sample code:
1: aspx
<
telerik:radcombobox
id
=
"ddlSupplier"
runat
=
"server"
skin
=
"Material"
rendermode
=
"Lightweight"
cssclass
=
"materializeit"
enableloadondemand
=
"true"
inputcssclass
=
"browser-default"
width
=
"100%"
filter
=
"Contains"
highlighttemplateditems
=
"true"
showmoreresultsbox
=
"false"
onitemsrequested
=
"ddlSupplier_ItemsRequested"
autopostback
=
"false"
>
</
telerik:radcombobox
>
2: code behind
protected void Page_Load(object sender, EventArgs e)
{
}
protected void saveIssue_Click(object sender, EventArgs e)
{
}
protected void ddlSupplier_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
RadComboBoxItem li = new RadComboBoxItem("Alan Jones (Brunel Systems Pty Ltd, test site)", "123");
ddlSupplier.Items.Add(li);
li = new RadComboBoxItem("Jackie Chiu (Optimum Construction, Optimum Construction (Sydney)) ", "23" );
ddlSupplier.Items.Add(li);
li = new RadComboBoxItem("Erik Baker (Optimum Construction, Optimum Construction (Sydney))", "2323");
ddlSupplier.Items.Add(li);
}
protected void b_Click(object sender, EventArgs e)
{
var a = ddlSupplier.SelectedValue; // most of the time returns "" for Edge
}
In WebService binding scenario, the text of the items is not encoded and HTML code might get executed.
In Server-side Load on Demand binding this is not observed.
The following code can be used as a temporary workaround for WebService binding scenario:
<script type="text/javascript">
Telerik.Web.UI.RadComboBoxItem.prototype._renderItemContent = function (d) {
if (this.get_imageUrl()) {
this._renderImage(d);
}
//https://stackoverflow.com/questions/6234773/can-i-escape-html-special-chars-in-javascript
function escapeHtml(unsafe) {
return unsafe
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
}
d[d.length] = escapeHtml(this.get_text());
}
</script>
Reproduction: https://demos.telerik.com/aspnet-ajax/combobox/examples/wai-aria-support/defaultcs.aspx
1) focus the ComboBox
2) press C
Expected:
- Camembert Pierrot is selected
- JAWS pronounces "c" and "Camembert Pierrot"
Actual:
- Camembert Pierrot is selected
- JAWS pronounces "c"
Reference for expected behavior: https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html
If the same text is typed into the input field as the one set for EmptyMessage and page is submitted, validator evaluates True. Current workaround is to subscribe the RadComboBox to OnClientFocus client event handler, and clear the EmptyMessage manually, thus preventing the EmptyMessage text to be sent to server. <telerik:RadComboBox ... OnClientFocus="comboFocus"> <script type="text/javascript"> function comboFocus(sender, args) { sender.set_emptyMessage(""); } </script>
A possible workaround would be tweaking the ItemRequestTimeout property of the ComboBox <telerik:RadComboBox ItemRequestTimeout="380" runat="server" ... > ... </telerik:RadComboBox>
The ComboBox pop-up is moving over the page during scrolling in mobile Chrome (Android device). The problem is occurres both in scrolled or zoomed elements. *The same issue is reproducible also in the SkinChooser. Steps to reproduce: 1. Run the following code in in mobile Chrome: <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" PersistenceMode="ViewState" RenderMode="Auto" Skin="Telerik"> </telerik:RadSkinManager><br /><br /> <telerik:RadComboBox ID="cb1" runat="server" AutoPostBack="true"> <Items> <telerik:RadComboBoxItem Text="January" Value="1" /> <telerik:RadComboBoxItem Text="February" Value="2" /> <telerik:RadComboBoxItem Text="March" Value="3" /> <telerik:RadComboBoxItem Text="April" Value="4" /> <telerik:RadComboBoxItem Text="May" Value="5" /> <telerik:RadComboBoxItem Text="June" Value="6" /> <telerik:RadComboBoxItem Text="July" Value="7" /> </Items> </telerik:RadComboBox> 2. Tap over the combo in order to show its dropdown 3. Drag to scroll the page to the left Result: The dropdown pop-up is moving over the page.