yourlabs/django-autocomplete-light

Properly load js and set zindex with DAL in a BSModal

hrlien opened this issue · 1 comments

I'm struggling to get DAL js loaded and setting the zindex for the select2-container when using BSModal.
Trying to set z-index value with css for the modal only, but it doesn't seem to work. (eg: #modal select2-container: 100000; )
Using a global css for select2-container works, but it then also applies to the page behind the modal, making the select2 fields in this page to show in the modal...
To get the js to work I need to include the modal form in the page behind. Loading the js in the modal doesn't work.
Tried with both {{form.media.js}} and loading the js-files directly using the <script> tag.

jpic commented

Might be worth a try converting the existing JS to WebComponents so we can delegate the lifecycle to the browser