Unplanned
Last Updated: 22 Jun 2020 17:19 by ADMIN
Missing User
Created on: 22 Jun 2020 17:15
Category: MultiSelect
Type: Bug Report
1
MultiSelect AutoClose not working when FormDecorator decorates selects
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" RenderMode="Lightweight" DecoratedControls="All" />
<telerik:RadMultiSelect runat="server"
    AutoClose="false"
    Placeholder="Select attendees..."
    DataTextField="text"
    DataValueField="text"
    Width="400px"
    ID="RadMultiSelect2">
    <Items>
        <telerik:MultiSelectItem Text="Steven White"></telerik:MultiSelectItem>
        <telerik:MultiSelectItem Text="Nancy King"></telerik:MultiSelectItem>
        <telerik:MultiSelectItem Text="Nancy Davolio"></telerik:MultiSelectItem>
    </Items>
</telerik:RadMultiSelect>
1 comment
ADMIN
Peter Milchev
Posted on: 22 Jun 2020 17:19

Hello Dennis,

Thank you for reporting the issue. 

The workaround options are the following two approaches:

1) Add Selects to the ControlsToSkip for the FormDecorator

2) Place the following script below the ScriptManager:

<script>
Telerik.Web.UI.RadFormDecorator.prototype.original_selectBodyClickHandler = Telerik.Web.UI.RadFormDecorator.prototype._selectBodyClickHandler;
Telerik.Web.UI.RadFormDecorator.prototype._selectBodyClickHandler = function (ev) {
    if ($telerik.$(ev.target).closest(".RadMultiSelect").length == 0 &&
        $telerik.$(ev.target).closest(".RadMultiSelectDropDown").length == 0) {
        this.original_selectBodyClickHandler(ev);
    }
}
Telerik.Web.UI.RadFormDecorator.prototype.original_selectBodyMouseDownHandler = Telerik.Web.UI.RadFormDecorator.prototype._selectBodyMouseDownHandler;
Telerik.Web.UI.RadFormDecorator.prototype._selectBodyMouseDownHandler = function (ev) {
    if ($telerik.$(ev.target).closest(".RadMultiSelect").length == 0 &&
        $telerik.$(ev.target).closest(".RadMultiSelectDropDown").length == 0) {
        this.original_selectBodyMouseDownHandler(ev);
    }
}
</script>

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.