Chandusangale / dropdown-check-list

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

If maxDropHeight is set to a number greater than 0, dropHeight is always set to maxDropHeight #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a standard select with several items
2. When activating the script, set maxDropHeight parameter to say 500
3. Load the page and click the select

What is the expected output? What do you see instead?

Dropdown should have the height of all the items. Instead, it's always 500px

What version of the product are you using? On what operating system?

Trunk

Please provide any additional information below.

In the current trunk version, line 419 should be changed to the following:

var dropHeight = dropCalculatedSize.height > options.maxDropHeight ?
parseInt(options.maxDropHeight) : dropCalculatedSize.height;

Original issue reported on code.google.com by fsmi...@gmail.com on 5 Mar 2010 at 7:59

GoogleCodeExporter commented 9 years ago
The fix above in incomplete and only works when the user sets a maxDropHeight. 
In the
default case (which I didn't notice before) where it's set to null, the code 
below is
a better fix:

var dropHeight = (options.maxDropHeight && (dropCalculatedSize.height >
options.maxDropHeight)) ? parseInt(options.maxDropHeight) : 
dropCalculatedSize.height;

Thanks

Original comment by fsmi...@gmail.com on 8 Mar 2010 at 2:41

GoogleCodeExporter commented 9 years ago
Thank you, I will include the fix in the next version.

Original comment by adrian.tosca on 8 Mar 2010 at 7:41

GoogleCodeExporter commented 9 years ago
Fix for this issue has been tested and will be included in version 1.1

Original comment by womohun...@ittrium.com on 14 Sep 2010 at 8:16

GoogleCodeExporter commented 9 years ago
Issue addressed with version 1.1.  Please let me know if you have any problems.

Original comment by womohun...@ittrium.com on 23 Sep 2010 at 3:35