Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Mobilecontainer - Scrolled down on PageLoad

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Mobilecontainer - Scrolled down on PageLoad

Hi Christo,

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

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Mobilecontainer - Scrolled down on PageLoad

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Mobilecontainer - Scrolled down on PageLoad

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)?

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Mobilecontainer - Scrolled down on PageLoad

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);

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Mobilecontainer - Scrolled down on PageLoad

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.

Dupdroid
Posts: 0
Joined: Sat Mar 30, 2013 9:07 pm

Mobilecontainer - Scrolled down on PageLoad

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

Any ideas yet?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Mobilecontainer - Scrolled down on PageLoad

Hello!

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

Return to “Issues”