We are currently facing an issue with GTree. When we click or expand any node near the bottom of the tree, it automatically scrolls up, and we have to scroll all the way down again manually.
After investigating, we found that this issue occurs only when we add a dropdown with the GTree. If we disable the dropdown, the tree works fine.
Can anyone help us resolve this issue?
Thank you.
We noticed that the automatic scrolling issue in GTree (O11) happens when a dropdown is placed inside the tree nodes. This is caused by the dropdown’s focus event forcing the page to scroll the element into view, which makes the tree jump back up.
✅ A simple fix is to override the dropdown’s scroll behavior in CSS/JS. For example, add this CSS to prevent the browser from auto-scrolling when the dropdown opens:
.select2-container--open { scroll-behavior: auto !important;}
Or, if you’re using a native OutSystems dropdown, you can handle it in JavaScript by preventing the scrollIntoView behavior:
document.querySelectorAll("select").forEach(el => { el.addEventListener("focus", e => { e.stopPropagation(); });});
This way, expanding the dropdown won’t force the tree to scroll up, and you can still expand/collapse nodes normally.
This can happen when GTree is combined with UI elements such as Dropdowns or Popups inside scrollable containers in OutSystems Reactive applications.
If above solution hasn't worked for you, can you share: