Closed (fixed)
Project:
Select 2
Version:
8.x-1.x-dev
Component:
Render element
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Nov 2018 at 11:21 UTC
Updated:
13 Mar 2024 at 02:49 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
marcoscanoThe overlay seems to have a z-index of 10000. I guess anything above that should do (at least I haven't found any issues with the modif in this patch).
Comment #3
chr.fritschI didn't looked into it.
Isn't it something that should be fixed with https://select2.org/dropdown#dropdown-placement
Comment #4
chr.fritschHi @marcoscano
what about this? https://github.com/thunder/select2/pull/51
Now you could do:
Comment #5
marcoscanoWorks for me!
(uploading the patch here as well so I can more easily target it with composer)
Thanks!
Comment #7
chr.fritschComment #9
scottsawyerI am having the same issue with 8.x-1.1. I am opening a taxonomy term form in a modal with a link, the term form has a field with a select2 widget. When I open the dialog, the select2-container is lower than the modal dialog, rendering it useless.
This is not the only place where the taxonomy term form renders, so I don't want to do an alter function to set the dropdownParent, nor do I want to set the z-index in CSS.
Any advice?
Comment #10
dave reidAnother issue is that when the select2 JS attach behavior runs, the jQuery dialog is not a selectable element with $('.ui-modal') when trying to use dropdownParent.
Comment #11
jonabhthe issue is still remain within drupal 8.8
I solved it by updating the css with:
.ui-dialog {z-index: 999; }
Comment #12
daletrexelJust dropping a note here that the fix applied in this issue (patch #5) no longer works. The problem with Select2 in modals has resurfaced, and a new solution is being worked on in #3211796: Issue with z-index when opening in modal dialog. So, if your search for help on this topic lead you here, hop over to this other issue and check out the patch available there.