Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address bar not hide on Android 2.3.4 native browser #107

Open
newjing opened this issue Jun 7, 2013 · 3 comments
Open

Address bar not hide on Android 2.3.4 native browser #107

newjing opened this issue Jun 7, 2013 · 3 comments

Comments

@newjing
Copy link

newjing commented Jun 7, 2013

I've written a very simple page as below:

<div data-role="page" id="articlePage" data-position="fixed" class="ui-responsive-panel">

    <div id="articleHeader" data-role="header" data-position="fixed" data-theme="b" data-tap-toggle="false" data-transition="none">
      <h1>Navigation</h1>
   </div>

   <div data-role="content" data-iscroll='{"hideScrollbar":true}'>
            <p> examples</p>
            <p><br/>simply multiline texts<br/>
aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb<br/>a<br/>aaaa<br/>bbb</p>
   </div>

</div>

*** no extra js ***

It works well on iOS, however, on my native browser of Android 2.3.4, the address bar is always hidden first and then pushes down. Also, it cannot be hid by either refresh or orientationchange.

It feels like the jquery-mobile-iscrollview rendering shortens the height so that the address bar is dragged down.

Seeking help....................thank you, please!

@newjing
Copy link
Author

newjing commented Jun 7, 2013

Just found that the official demo "iscrollview/demo/build/index_13.html" also has the address bar problem on Android 2.3.4 (Galaxy II)

@jtara
Copy link
Member

jtara commented Jun 8, 2013

It sizes to fit the page. Unfortunately, if the address bar is shown then, of course, it sizes the page to fit under the address bar.

The code addresses this specifically for iOS and makes an adjustment for the address bar.

Unfortunately, this is likely quite difficult to impossible for Android, because of lack of standardization. On iOS, I can count on the # of pixels for the address bar to be consistent.

I'm open to suggestions and pull requests if you can figure out how to make this work across a range of Android devices and browsers.

I'm afraid the only work I do with Android is PhoneGap, and in that environment there is no address bar. So, this hasn't been a priority.

@newjing
Copy link
Author

newjing commented Jun 8, 2013

Jtata, thank you for your reply.
I guess there is a workaround for all Android devices: Automatically add 100px (biggerer than any address bar height) to JQM iscrollview scrollerH and wrapperH, so that the window.scrollTo(0,1) can hide the address bar. Maybe the bottom-most part of the wrapper become invisible but it doesn't matter because bigger scrollH has added extra space in the bottom. The only concern might be the modification on pull-to-refresh accordingly.

The reason I believe the way above can work is that JQM can hide the address bar well, and the issue with iscrollview is due to (wrapperH + headerHight < deviceHeight).

It would be great if you can pull request on this, coz android fullscreen is fairly important. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants