Chandusangale / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
1 stars 0 forks source link

Problem with horizontal scrollbar when minDropHeight set #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I've been using this for a couple of days and came across a problem whereby if 
you set a minDropHeight, and an item in the dropdown was wider than the Width 
setting for the dropdownlis controlt, then it would case a horizontal scrollbar 
due to the width of the vertical scrollbar and how it is placed.  I have 
actually implemented a fix in the _setsize function as below:

if(options.maxDropHeight != null)
            {
                var scrollbarOffset = 18;
                dropWidth += scrollbarOffset;
            }

I have it placed after this line:

 // ensure the drop container is not less than the control width (would be ugly)
            var dropWidth = dropCalculatedSize.width < controlWidth ? controlWidth : dropCalculatedSize.width;

Original issue reported on code.google.com by captainy...@gmail.com on 30 Jun 2011 at 6:41

GoogleCodeExporter commented 9 years ago

Original comment by womohun...@ittrium.com on 5 Jul 2011 at 2:27