Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:19:51+00:00 2026-05-31T21:19:51+00:00

Using JavaScript, how do I scroll past the URL bar in Landscape mode. On

  • 0

Using JavaScript, how do I scroll past the URL bar in Landscape mode. On Portrait mode, you just do window.scrollTo(0,1) and that works, but not in Landscape mode. It goes part-way on the URL bar.

Any suggestions on what to try?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:19:53+00:00Added an answer on May 31, 2026 at 9:19 pm

    There is two ways of doing this. Depending on what kind of page you are displaying.

    One thing to be aware of is that the mobile browser needs to have some content to scroll on. And by content to scroll on I mean that the content in the page needs to be higher then the window height. If not it’s not going to scroll down at all.

    Option1

    Go for this if you know that your page content is more then the window height.

    
        (function removeAddressBar(){
             // Make sure it really scrolls down.
             window.scrollTo(0, 10);
    
             // Set a timeout to check that it has scrolled down.
             setTimeout(function() { 
                  if(window.scrollY == 0) { 
                       removeAddressBar();
                  }else{
                       window.scrollTo(0, 1);
                       //launch();
                  }
             }, 500);
        })(this)
    
    

    Option2

    Go for this if you dont know if your content is more then the window height.

    <div id='scroller' style='position:absolute;height:2000px;'></div>

    
        (function removeAddressBar(){
             window.scrollTo(0, 10);
             setTimeout(function() { 
                  if(window.scrollY == 0) {
                       removeAddressBar();
                  }else{
                       window.scrollTo(0, 1);
                       document.getElementById('scroller').style.height = window.innerHeight+'px';
                       //launch();
                  }
             }, 500);
        })(this)
    
    

    This might look like a lot for such a simple thing. But I think this is the most reliable way so far.. I have tested this on iOS and Android in both orientations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using JavaScript I open the pop window and parent window is inactive at this
Using JavaScript, how do I create an HTML table that can "accept" numeric matrix
How do I scroll to the top of the page using JavaScript? The scrollbar
I am currently using some javascript to scroll some text on my web page.
How do I get the amount of scroll in a div tag using JavaScript?
I am trying to Simulate a scroll event using Javascript for Mobile Safari. I
I have a bar graph in my web app (drawn using javascript). It can
I'm trying to recreate the iPhone flick / scroll event in a window using
I'm trying to set up a website using HTML and JavaScript that displays sections
I'm using javascript to move a div down the page as you scroll. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.