Unplanned
Last Updated: 09 Feb 2024 09:58 by Christian
Christian
Created on: 02 Feb 2024 10:44
Category: Kendo UI for jQuery
Type: Bug Report
1
There is a bug in filtered, virtual ComboBox if data source is set programmtically

In a very special case it is impossible to select a value from the ComboBox. It only occurs on iPads.

if ComboBox filter is set, virtualization is on and the datasource is set programmatically after initialization. A data item cannot be selected from the list if it is filtered before hand and the item is located at the second page inside the popup.

Steps to reproduce:

  1. Open https://dojo.telerik.com/UbuRecut/4 on an iPad
  2. Wait till data source is set
  3. Input filter value (Popup should open and be scrollable)
  4. scroll to the end of the popup
  5. click element at the end of the list
  6. No item is selected

Used Dojo Snippet:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/7.2.0/default/default-ocean-blue.css"/>

    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2024.1.130/js/kendo.all.min.js"></script>
</head>
<body>
  
<input id="orders" style="width: 400px" />
<script>
  
    $(document).ready(function() {
        const ctrl = $("#orders").kendoComboBox({
            template: '<span class="order-id">#= OrderID #</span> #= ShipName #, #= ShipCountry #',
            dataTextField: "ShipName",
            dataValueField: "OrderID",
          filter: 'startswith',
            virtual: {
                itemHeight: 26,
                valueMapper: function(options) {
                    $.ajax({
                        url: "https://demos.telerik.com/kendo-ui/service/Orders/ValueMapper",
                        type: "GET",
                        dataType: "jsonp",
                        data: convertValues(options.value),
                        success: function (data) {
                            //the **data** is either index or array of indices.
                            //Example:
                            // 10258 -> 10 (index in the Orders collection)
                            // [10258, 10261] -> [10, 14] (indices in the Orders collection)

                            options.success(data);
                        }
                    })
                }
            },
            height: 520,
        }).data('kendoComboBox');
      
  $.ajax({
          url: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders",
          type: "GET",
          dataType: "json",
          success: function (data) {
            ctrl.setDataSource(data.d)
          }
        })
    });
  
  

    function convertValues(value) {
        var data = {};

        value = $.isArray(value) ? value : [value];

        for (var idx = 0; idx < value.length; idx++) {
            data["values[" + idx + "]"] = value[idx];
        }

        return data;
    }
</script>
</body>
</html>
3 comments
Christian
Posted on: 09 Feb 2024 09:58
Thank you very much.
ADMIN
Martin
Posted on: 09 Feb 2024 09:49

Hello, Christian,

We were able to reproduce the issue when the keyboard on the device was visible. 

As a small token of gratitude for reporting the bug for us, I am updating your Telerik Points.

Please keep following the thread for further information on the matter.

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
ADMIN
Martin
Posted on: 09 Feb 2024 09:00

Hello, Christian,

I tested the provided scenario on an iPad Mini both in Safari and Chrome, but I was unable to reproduce the behaviour. I followed the steps from the video, with the only difference that I am hiding the keyboard before selecting the item, because otherwise the last item is not visible.

Could you please let me know if I am missing something to reproduce? What device are you running the example on?

Looking forward to your reply.

Regards,
Martin
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources