I'm trying to prevent Bootstrap's automatic drop up from occurring on smaller screen sizes.
The S.O. question here says to add to add the attribute data-dropup-auto
and set it to false
, however upon doing so it doesn't work. Inspecting the select drop down from the Chrome developer console also reveals the attribute to be present and correctly set to false.
Here is the code for my select in the form.
<%= f.select(:countries_id_eq, Country.order(:name).collect{|c| [c.name,c.id]}, {:prompt => "Exam Cycle"}, { :class => 'form-control input-lg', "data-dropup-auto" => "false" }) %>
In the developer console, the select renders like this
<select class="form-control input-lg" id="q_universities_id_eq" name="q[universities_id_eq]" data-dropup-auto="false"><option value="">Subjects</option>...</select>
Any help would be much appreciated.