Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If select box is hidden width isn't set properly #81

Open
henesnarfel opened this issue Jun 27, 2014 · 1 comment
Open

If select box is hidden width isn't set properly #81

henesnarfel opened this issue Jun 27, 2014 · 1 comment

Comments

@henesnarfel
Copy link

I have a form with selects that is in a hidden div during page load. The user must click a button for the form to show. The issue I'm having is that it is not properly setting the width of the custom select box because the element is hidden. Once the form is shown and you click the select it won't open. If I inspect the element it is being given a width of 0 even though I've set the width within the css.

If I use javascript to hide the div after the customselect call the select box works as expected. But when I hide it with css it seems as though since the element is hidden that the width is not getting set.

@iDevy
Copy link

iDevy commented Aug 3, 2014

same one here... Looks like plugin needs to have a visibility-state check and do a reinitialization..

UPD:
This one should help for now - disable the width cssattr after the show or toggle event occurs:

$('selector').prop('style').removeProperty('width');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants