Parabellum1905y / ufd

Automatically exported from code.google.com/p/ufd
GNU General Public License v2.0
0 stars 0 forks source link

listWidthFixed doesn't do anything #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a select with items longer than the width of the select
2. apply .ufd({listMaxWidth:false})

What is the expected output? What do you see instead?
expecting drop-down to be wider than the initial select widget.  it's not.

Original issue reported on code.google.com by simonjwi...@gmail.com on 30 Nov 2010 at 8:09

GoogleCodeExporter commented 8 years ago
the parameter need to be checked for at jquery.ui.ufd.js lines 674 and 675

Original comment by simonjwi...@gmail.com on 30 Nov 2010 at 8:18

GoogleCodeExporter commented 8 years ago
I have created a simple case that reproduces this issue here:

http://jsfiddle.net/ThLqa/

Original comment by elwyn...@gmail.com on 3 May 2011 at 10:24

GoogleCodeExporter commented 8 years ago
The same problem still happens...

Original comment by AlejaV...@gmail.com on 15 Jul 2011 at 9:31

GoogleCodeExporter commented 8 years ago
ufd({listWidthFixed:false,allowLR:true});

"allowLR" doesn't work neither. Sometimes the scroll appears, but disabled...

Original comment by AlejaV...@gmail.com on 15 Jul 2011 at 9:32

GoogleCodeExporter commented 8 years ago
I fixed manually the problem.
It was in the browser check:

// check browser supports min-width, revert to fixed if no support - Looking at 
you, iE6...
if(!this.options.listWidthFixed){ 
    //this.listWrapper.css({"width": 50, "min-width": 100});
    //this.options.listWidthFixed = (this.listWrapper.width() < 100);
    //this.listWrapper.css({"width": null, "min-width": null});
        }

Even if we are not in IE6, this lefts both attributes "width" and "min-width" 
in the list wrapper, and "width" overrides "min-width" in the same element...

As my application will not support IE6, no matter what, I disable the that 
check and I have auto-width lists in my selects.

Original comment by AlejaV...@gmail.com on 15 Jul 2011 at 9:51

GoogleCodeExporter commented 8 years ago
Exactly, when width and min-width are set simultaneously, width takes 
precedence.

Original comment by LeonidKh...@gmail.com on 11 Nov 2011 at 1:45

GoogleCodeExporter commented 8 years ago
See issue 64:

http://code.google.com/p/ufd/issues/detail?id=64

Original comment by BStruth...@gmail.com on 9 Mar 2012 at 8:35

GoogleCodeExporter commented 8 years ago
As BStruthers said, this is the same issue as 

http://code.google.com/p/ufd/issues/detail?id=64

I have made an updated fiddle based off elwynbots example.  It points to the 
latest trunk UFD, and it appears to work fine.   Remember that in iE6 it stays 
fixed width, as iE doesnt support min-width...

Original comment by thetoolman on 22 May 2012 at 9:54

GoogleCodeExporter commented 8 years ago
 AlejaVigo you mentioned allowLR not working, and that is a slight bug - LR scroll only appears when the list is large enough to have vertical scrollbars also. 

 Your code example is odd because if the width stretches to match the content (listWidthFixed:false), then it will never need LR scroll bars!   I suppose its a reasonable fallback in iE6.

Original comment by thetoolman on 22 May 2012 at 9:57

GoogleCodeExporter commented 8 years ago

Original comment by thetoolman on 22 May 2012 at 10:01

GoogleCodeExporter commented 8 years ago
I created a new issue for the allowLR bug reported by AlejaVigo: 

http://code.google.com/p/ufd/issues/detail?id=70

Original comment by thetoolman on 22 May 2012 at 10:02