[Bug] Select2 is not clickable with inline creation modal
See original GitHub issueBug report
What I did
I made an inline creation form. And this modal have a relationship input. That’s it
What I expected to happen
Well, i wanted it to work as expected 😃
What happened
Select2 dropdown works fine, and selection too. But the typing is not. The input is not even focusable 😦
What I’ve already tried to fix it
Tested it with Chrome, and Firefox.
Is it a bug in the latest version of Backpack?
After I run composer update backpack/crud
the bug is still there.
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version
the output is:
PHP 8.0.1 (cli) (built: Jan 13 2021 08:22:35) ( NTS ) Copyright © The PHP Group Zend Engine v4.0.1, Copyright © Zend Technologies with Zend OPcache v8.0.1, Copyright ©, by Zend Technologies
LARAVEL VERSION:
v8.60.0@44f16a31a1d4ac8a51605550d7796e2273984a48
BACKPACK VERSION:
4.1.53@8698b8ed51e8b18e311f928f6f80a7161f1eb172
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Common problems - The jQuery replacement for select boxes
Select2 does not function properly when I use it inside a Bootstrap modal. ... This issue occurs because Bootstrap modals tend to steal...
Read more >Select2 doesn't work when embedded in a bootstrap modal
According to the official select2 documentation this issue occurs because Bootstrap modals tend to steal focus from other elements outside of the modal....
Read more >Select2 and Bootstrap Integration by Keenthemes
Select2's is globally initialized through data-control="select2" HTML attribute as defined in src/js/layout/app.js and some options can be be passed through ...
Read more >Magnific Popup Documentation - Dmitry Semenov
// From HTML string $('button').magnificPopup({ items: { src: '<div class="white-popup">Dynamically created popup</div>', type: 'inline' } }); // From an ...
Read more >Options - Select2 - JeeSite
No. This is a limitation of the HTML specification and is not a limitation that Select2 can overcome. You can emulate grouping by...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @Neko2h ! Good news, I think we are on our way to fix this. Thanks for the report.
I’ve just submitted PR #3876 to address this issue. If you would like to give it a try before it’s merged let us know if it’s fixed on your side too, it would help us alot.
I will be closing this issue so we keep any discussions in the PR thread.
Wish you the best, Pedro
@tabacitu I’ve tried all solutions proposed in that PR, and none of them solved the problem
inside modals
.I think what best describes our problem is: https://github.com/select2/select2-bootstrap-theme/issues/41
I think the easiest solution provided there is overriding the bootstrap modal focus function:
https://github.com/select2/select2-bootstrap-theme/issues/41#issuecomment-878255839
But not sure if it has further consequences like removing the
tabindex
. I still thinkdropdownParent
is the safest but it might get ugly the way we need to check for the correct parent.@promatik wanna shine in here ? I am out of ideas to fix this other than what I’ve proposed by adding the select2 config.
Best, Pedro