Display worked, and not working anymore. Had a look on Github History. Is there a way to find the trouble?


Hi there,
New developper on RoR, I’m using Select2 to display some companies or departments.
Select2 was working fine for some weeks, and now, display is broken on every select2 input.
I used github history to detect why it’s failing now, but no indications of modifications which can explain that.

Do you have any idea on how detect the trouble, or how to fix this ?
I can use Select2 but, the input is “invisible” or like a “very small square”.


It seems that the final release of version 4.0.6 broke several things. I have not seen the behavior you described (the input field being invisible or very small), but several Select2 adopters have noticed that the dropdown will not close after making a selection.

I recommend you upgrade to version 4.0.7-rc.0 (Release Candidate 0), which works correctly (at least with regard to the dropdown issue I described above).


Dear John, many thanks for your reply. I updated to version 4.0.7-rc.0
Unfortunately, it didn’t fix the problem.
It’s like I missed a small line of css. :confused:


Can you put your code on jsfiddle.net or codepen.io so I can see what it’s doing?


Hi John, Thank you for your help. I used jsfiddle.net for the first time. I hope I used it correctly.
I copied the HTML and JS code from my page where Select2 is broken :

Is it helpful ? I hope I haven’t forgotten anything.


It doesn’t exactly work because you have JSP tags in your html, which jsfiddle doesn’t know how to handle. However, I see that you are sourcing two different versions of jQuery in your html file. You should only source jQuery once. Take out the <script> tag in your <!-- select2 --> section, and that might fix the problem.