Selectize.js: Can not display completely in a bootstrap modal

Created on 15 Sep 2013  路  7Comments  路  Source: selectize/selectize.js

The dropdown box can display completely.
http://jsfiddle.net/yesmeck/yaBPm/1/

question

Most helpful comment

this solution seems to be no longer working. I checked the fiddle. Any new workaround available?

All 7 comments

This is due to two things:

  1. The "dropdownParent" option needs to be set to "body", so that it's not clipped by the container.
  2. The z-index of the dropdown needs to be higher than the modal. I'll update the CSS so that this comes by default.

Related: #47, #64

http://jsfiddle.net/yaBPm/6/

I tried set "dropdownParent" to "body", but forgot set the z-index. It works great now, thank you.

Why not set dropdownParent's default value to "body"?

I just had this issue on the newest version of Selectize.js. The Bootstrap 3 modal had z-index: 1040 and the selectize-dropdown had z-index: 1000 in selectize.bootstrap3.css. Just a heads up since I had to fix it manually. (I'm using bootstrap 3.1.1)

this solution seems to be no longer working. I checked the fiddle. Any new workaround available?

some bootstrap classes force the select to have a position relative attribute instead of absolute. Add to the style section :
.selectize-dropdown { z-index: 99999 !important; position:absolute !important;}

I could not make it work inside a modal even with all these options...

Was this page helpful?
0 / 5 - 0 ratings