Need More Info
Last Updated: 30 Aug 2024 07:13 by ADMIN
AGB
Created on: 09 Aug 2024 08:49
Category: Kendo UI for jQuery
Type: Bug Report
0
Combobox - List scrollbar issue under Chrome (v2024.3.806)
Hi Guys,

I have been investigating an issue with the ComboBox component under Chrome whereby a scrollbar is being show when using the autoWidth option and a limited number of list entries.

The scenario is as follows

- When the control initially loads and you hit the dropdown button the list does not have vertical scrollbar.
  (See screen shot 1)  

- Select an item and and then hit the clear button.
  Now when you hit the dropdown the list has a vertical scrollbar.
  (See screen shot 2)

The issue is very random and can occur with any number of list items, providing the initial dropdown doesn't require a scrollbar.

I have tried to create a dojo to illustrate the problem but have so far failed.

Looking at the element with Dev tools I see on the initial dropdown the wrapper div is as follows

    <div class="k-list-content k-list-scroller" unselectable="on" style="overflow: hidden auto;">

but after select, clear & dropdown the div shows

    <div class="k-list-content k-list-scroller" unselectable="on" style="overflow: hidden scroll;">

Tracing through the code the problem is within the following function of the kendo.list.js file

        _refreshScroll: function() {
            var listView = this.listView;
            var enableYScroll = listView.element.height() > listView.content.height();

            if (this.options.autoWidth) {
                listView.content.css({
                    overflowX: "hidden",
                    overflowY: enableYScroll ? "scroll" : "auto"
                });
            }
        },

It would appear that under certain conditions Chrome is setting the enableYScroll value to true and hence the 'scroll'.

Looking at this function I cannot see a reason why there is even a need to set overflowY to 'scroll' surely just leaving it set as 'auto' is good enough and let the browser decided if scrollbars are required.

Regards
Alan

5 comments
ADMIN
Nikolay
Posted on: 30 Aug 2024 07:13

Hello Alan,

Just to let you know we are working on the case and will follow up shortly.

Regards,
Nikolay
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

AGB
Posted on: 23 Aug 2024 07:17
Hi Martin,

I appreciate that without a failing example the root cause is unknown, but even if you did I suspect the solution would be to just leave overflowY set to "auto" and let the browser handle the scrollbars.

If you are clearly not going to spend any more time on this issue or pass it onto the developers for comment as to why the _refreshScroll() function is even needed in the first place my only options are:-

1) Tell my customers this is a 3rd Party bug which is not going to be addressed by the supplier even though they have been told were the problem lies along with a working solution.

2) Patch your source code after even release to address the issue myself.

3) Start looking around for a different supplier.

Regards
Alan
ADMIN
Martin
Posted on: 23 Aug 2024 06:10

Hello, Alan,

As we are unable to observe the issue, we cannot confirm it as a bug. We need to be able to reproduce the behaviour as our developers need that as well when reviewing and testing bug fixes. The issue might not event be caused by Kendo, but rather by the browser given the information you shared in your last reply.

If any details come to your mind that would help us to reproduce the issue in the Dojo example I shared earlier, we will be able to provide further insights on the matter.

Regards,
Martin
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

AGB
Posted on: 16 Aug 2024 08:59
Hi Martin,

As I said above

- I was unable to reproduce the problem in a dojo example either.
- It is very random ... Some lists show the problem others don't.
- It only happens under Chrome

- It would appear that under certain conditions Chrome evaluates enableYScroll to be true hence the 'scroll'
  But when the dropdown is shown the scroll bar is disabled because there is nothing to scroll

- To my mind the solution is to stop evaluating enableYScroll and just leave it set to 'auto' and let the browser determine if a scrollbar is required.

Regards
Alan
ADMIN
Martin
Posted on: 16 Aug 2024 08:29

Hello, Alan,

I tried to reproduce the behaviour in this Dojo example, but I don't see the scrollbar appearing. Could you check the example and let me know if the configuration is similar to yours, or if I am missing something?

Looking forward to your reply.

Regards,
Martin
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024