-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
select2 4.0 - dropdownAutoWidth not working #3101
Comments
Merging into #3419. |
Is this fix available as part of 4.0.0 release. When will we get it into any further release??? |
Unfortunately that other ticket was closed off as being a different issue, so I'm reopening this one temporarily. Can you expand upon the issue you are facing by adding a few more pieces of information to your bug report?
The contributing guide contains a useful section with a few questions which can help us track down the bug and speed up the process of finding a fix for it. The creation of an isolated test case would also be useful. |
I have the same problem. It works for me if I add "css.position = 'relative';" at line 4246 (select2.full.js / 4.0.1) if (this.options.get('dropdownAutoWidth')) {
css.minWidth = css.width;
css.width = 'auto';
css.position = 'relative';
} |
As @G4g4Rm3L said, should be added "css.position = 'relative';" at if (this.options.get('dropdownAutoWidth')). Without this change option not working for me. not working example on jsfiddle: |
Please re-open. Still has issues with not auto-sizing to the container of the select2: |
Hm... https://jsfiddle.net/fbz0mngp/7/. It looks fine for me (?) |
In this example, would you not expect the select to act responsively and shrink down to fill the right-most div (make sure you select the long answer from the list) ?: |
option dropdownAutoWidth is not working in 4.0. It's important in my case...
The text was updated successfully, but these errors were encountered: