Mendix Mobile Not Scrolling to top.

When i use the Mendix Mobile version and navigate from one screen to another i have noticed that the next screen loads already scrolled down. This means that when you load up the next form in the sequence of several forms the new form will be in the same position as the previous form. I would preferably like the form to be loaded at the top. Is there anyway to override this? or is this a bug?
1 answers

You can fix this by adding the following javascript in your index-mobile.html:

<script type="text/javascript">
    mx.addOnLoad(function() {
        dojo.connect(mobile.lib.Form.prototype, "onBeforeShow", function() {
            window.scrollTo(0, 1);

sorry, had to remove the open and close brackets to get it to render here (I've placed an image as wellalt text

you want to past it in just after your mobile.js that should be located in the <body>

you can also do "onAfterShow" but then it would display wrong and refresh.......

(Rvh edit: You can use ctrl+K for a code block.)