After the last update of OutsystemsUI, I no longer have some features in which it was necessary by javascript to obtain the scroll position.



Basically the following properties were added


.screen-container {

    /*overflow-y: initial;*/ /* Comented due to changes in scroll position */

    overflow-y: auto; /* Temporary fix related to changes in scroll position */

    overflow-x: hidden; /* Temporary fix related to changes in scroll position*/

 }


html, body, #reactContainer, #transitionContainer, .screen-container { height: 100%; }


/* applied to the root element of the screen which is also the scroll host */

.screen-container { overflow-y: auto; height: 100vh; }



With this CSS we lose the chance of implementing scroll events and the like on the window object.



What was the reason for this change?





Hi Luis,

I've asked the OutSystems UI team to take a look at this.

I used this code to solve the problem. 


html { overflow-x: hidden; overflow-y: auto; } 

html, body, #reactContainer, #transitionContainer, .screen-container { height: auto; }

Hello Luis,

In a recent update, we changed the scrollable element of the layout to be the ".screen-container" DIV instead of the HTML in order to fix an issue that prevented the screen to go back to the last scroll position, when performing a back navigation action, e.g.: go back to a list screen and remember the scroll position.

Our intention is to have the scrollable element being the HTML in the future, which has multiple advantages, but currently the back navigation was an important issue to be fixed.

You can still use scroll events on the scrollable element if needed.

Let me know if this helps :)

Dinis Carvalho wrote:

Hello Luis,

In a recent update, we changed the scrollable element of the layout to be the ".screen-container" DIV instead of the HTML in order to fix an issue that prevented the screen to go back to the last scroll position, when performing a back navigation action, e.g.: go back to a list screen and remember the scroll position.

Our intention is to have the scrollable element being the HTML in the future, which has multiple advantages, but currently the back navigation was an important issue to be fixed.

You can still use scroll events on the scrollable element if needed.

Let me know if this helps :)

I understand the change

I only detected it when I lost the window scroll events and some features stopped working.

Basically I know that just change the element that is associated with the window event to the screen-container.


I believe that a lot of people are using events related to the window and have not yet detected that they could have stopped working.