I've implemented a modal using the Bootstrap library that contains multiple lists populated through Ajax search requests. These lists have a fixed size and utilize the CSS property overflow-y: scroll
to accommodate a large number of elements without affecting the overall page size.
However, I've encountered an issue where selecting an item towards the bottom of the list causes the entire page to scroll to the position where that item would be displayed, disregarding the overflow-y: scroll
property.
I attempted to address this by using the overflow: revert
property to maintain the scroll position, but this solution proved ineffective, especially on smaller screens, as the fixed-sized lists prevent users from scrolling to view all elements.
Do you have any suggestions on how to resolve this issue?
Below, you'll find the simplified code snippet with a single list and white space allocated for additional elements, providing you with a clearer understanding of the situation.