Combobox inside a div, list of options doesn't scroll with

I’m having a problem with my combobox list.
Because it’s in an other div the list of options doesn’t scroll with the combobox.

I think the answer lies in the following piece of code.
document.body.insertBefore(this.DOMlist,document.body.firstChild);
and document.body.insertBefore(this.DOMlistF,document.body.firstChild);

I already tried to put it inside the div with document.body.children[4].appendChild(this.DOMlist);
But still the list doesn’t scroll with the combobox.

Please help, Thanks in advance :slight_smile:

Hello
Please, attach completed demo to reproduce the issue.
docs.dhtmlx.com/doku.php?id=othe … leted_demo

Take a DhtmlxCombo and put it in a div like for example

When you click on the combobox to produce a list with option use the scrollbar and the list doesn’t scroll with the combobox element.

I need to specify: do you want a scroll in combo list oor in your div?
In general combo activates scroll within its list automatically if height of options exceeds the handed-over height of the list container.

I want a scroll in my div.

Сombo won’t force scroll to appear in your div. Z-index of the list is sufficient for list opening over the window.
For what you need such behavior of a combo and div?

I have a webpage with a wrapper div, header div, a content div and a footer div. The content div is a scrollable div so that the header and footer stays at the same place. So i want to fill the content div with DHTMLX comboboxes. Because the list is attached to the body of the page, the DHTMLX combobox list of options doesn’t scroll with the content div. Thank you for your promptly reply. :slight_smile:

I made an animated gif.
I just put a div scrollable arround the combobox.

Whether it helped you?

I have found that this is a common problem and one of the easiest ways is to just close the combobox when you scroll from your content div. :smiley:

Source: https://github.com/ivaynberg/select2/issues/149

Hello,

is there any solution ?
I am using the combo box and have the same problem. When I scroll my page the combo list doesn’t move.
I tried to copy and past the last version of combobox files but didn’t changed anything.
Thank you.