Page 1 of 1

Mobilecontainer - Scrolled down on PageLoad

Posted: Thu Apr 03, 2014 9:14 am
by Dupdroid

Good day,

For some reason my pages are scrolled down when a page is loaded. I think it is the mobilecontainer, see image attached. Here is the css for the mobilecontainer:

.mobilecontainer_max_width_white_back {
margin: 0 auto !important;
max-width: 561px !important;
max-height: 600px !important;
background-color: rgba(255, 255, 255, 0.5);
-webkit-user-select: none; /* Chrome/Safari /
-moz-user-select: none; / Firefox /
-ms-user-select: none; / IE10+ /
-o-user-select: none; user-select: none; / Rules below not implemented in browsers yet */
}

I have tested the following code to try and remedy the problem but no luck yet. Calling initPage on PageLoad event.

function initPage() {
$(document).ready(function() {
// Scroll page to top after loaded.
//$(window).scrollTop(0);
//Appery('mobilecontainer').scrollTop(0);
//$('html,body').scrollTop(0);
});
}
Image


Mobilecontainer - Scrolled down on PageLoad

Posted: Thu Apr 03, 2014 1:17 pm
by Kateryna Grynko

Hi Christo,

Try running code$(window).scrollTop(0);/code on Page Show event.


Mobilecontainer - Scrolled down on PageLoad

Posted: Thu Apr 03, 2014 1:42 pm
by Dupdroid

Just tried it. Makes no difference. No errors in console either.


Mobilecontainer - Scrolled down on PageLoad

Posted: Thu Apr 03, 2014 3:05 pm
by Maryna Brodina

Hello!

Could you clarify in what container (component) all this information is?
Is it set static (as you have set it) or you add it on page dynamically (in what way)?


Mobilecontainer - Scrolled down on PageLoad

Posted: Thu Apr 03, 2014 3:15 pm
by Dupdroid

The information is loaded dynamically into and html component in the example provided. But I have other pages that shows the same behaviour where I'm also using a html component with static content.

I have now tested the code below in the Page Show event but no luck.

Appery('html_ArticleContent').scrollTop(0);


Mobilecontainer - Scrolled down on PageLoad

Posted: Thu Apr 03, 2014 10:25 pm
by Alena Prykhodko

Hi Christo,

You need to run this code when content is loaded and displayed on your page.

Thus you should use onComplete event handler for service which loads this dynamic content.

Please give us a public link on your app. We will check it.


Mobilecontainer - Scrolled down on PageLoad

Posted: Wed Apr 09, 2014 10:27 am
by Dupdroid

I have supplied the public link via email as you requested.

Any ideas yet?


Mobilecontainer - Scrolled down on PageLoad

Posted: Wed Apr 09, 2014 11:58 am
by Maryna Brodina

Hello!

Sorry, can't find that link. Could you send it again?