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

is there any compatibility issues with select2.js? #280

Open
Misakic opened this issue Sep 15, 2015 · 1 comment
Open

is there any compatibility issues with select2.js? #280

Misakic opened this issue Sep 15, 2015 · 1 comment

Comments

@Misakic
Copy link

Misakic commented Sep 15, 2015

when i used select2.js in bootstrap-modal,the modal fails to display options correctly.

@joelmora
Copy link

I have the same problem, is a problem related with z-index property on select2 plugin, what I do for temporary fix this problem is assign a z-index property on initialization.

//global javascript
var zIndexSelect2 = 1050;
//local javascript
zIndexSelect2 = zIndexSelect2 + 10;

var options = {
    dropdownCss: {
        'z-index': zIndexSelect2
    }
    //other options...
}

//inicialize
$('select').select2(options)

so every time you use select2 within a modal you must set zIndexSelect2 + 10 an then set the options otherwise modal will be on top select2.

Is a temporary fix but at least it works for me

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