cancel
Showing results for 
Search instead for 
Did you mean: 

Listbox Scroll not functioning correctly

Former Member
0 Kudos

I saw strange behaviour with Listbox and haven't seen discussed in the forum.

I've a listobx inside the Popup component. Listbox shows the list of material which are in range of 50-60. I get the scrollbar for listbox when popup is called. it shows approx. 10 materials in popup. I scrolldown to select the desired material. As soon as I select the material. it scrolls up and first page is disaplyed with list of materials. I've to again scroll down to make sure if matrial I clicked is selected. I want system to stay at same material after material is selected in the listbox.

Has anyone come across this issue? We're currently on DS 1.4. Any idea how to fix it?

Thanks,

Milind

Accepted Solutions (0)

Answers (1)

Answers (1)

mike_howles4
Active Contributor
0 Kudos

It sounds as if you might have an on select event tied to your list box with some script.  Does that script possibly repopulate the contents of that list box?

Former Member
0 Kudos

Thanks Mike.

I don't have any script  Listbox -> 'On Select' . I also noticed that the issue is happening only if I displays the Listbox in popup. If I displays the Listbox in screen layout, it works perfectly fine. I've attached the screenshot for the scenario when Listbox scrollbar not functioning correctly. Any idea/solution?

Thanks,

Milind

mike_howles4
Active Contributor
0 Kudos

Ok I understand now I think what is happening.  Not quite my suspicion but I think it may be the same problem which is when you HIDE/SHOW a popup, it re-renders the child controls, which would include the LISTBOX_MATERIAL component, which would unfortunately reset the vertical scroll offset it appears.

One thought on how to work around this would be to instead of hiding/closing or showing/opening the popup, perhaps instead apply a CSS class to the pop-up that has a display:none style rule to "hide" it, and display:block (or relative/etc) to "show" it but as far as Design Studio is concerned, always leave it open.

The cosmetic modification of the control via CSS should prevent the pop-up from triggering an undesired re-render.