-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Can't type anything if select2 in modal #41
Comments
You need to check the demos and docs pages for the widget. The Select2 widget works perfectly with modal. You need to set the Modal markup correctly for it to work. Check the demo page and scroll down to button for example for Select2 inside a MODAL. Note the important setting for the Modal dialog... the |
Ok. Thanks. It's just that it worked fine before, even without setting 'tabindex' => false. Have quite few places to update now :) |
thx |
sorry for open this issue again, |
how to set it required like HTML 5 validation |
Can't type anything if select2 in modal when using Firefox, Chrome works fine. Can you help me with this? thank you! |
Although I have it working in a bootstap modal... it works in chrome... but not in firefox...
worked for me |
|
You may want to set echo Select2::widget([
'pluginOptions' => [
'dropdownParent' => new yii\web\JsExpression('$("#modalDialogId")'),
],
// your other select2 widget settings
]); |
After recent updates typing wasn't working in any of my select2 widgets that were inside bootstrap modals. Then I found this solution which seems to have worked for me: select2/select2#1436
It was working fine before I did the update on everything and now I don't know what the cause of the problem is (either update of select2 widget or yii2 update), but since that solution is from almost 2 years ago I have a feeling that the problem is somewhere in your widget, because it was updated very recently.
The text was updated successfully, but these errors were encountered: