Here's the HTML page:
- <div data-role="header" id="headertop" data-position="fixed" data-tap-toggle="false" data-theme="a">
- <div id="logoAndBackDiv">
- <h1 id="header1">
- <img src="css/images/flogo.png" alt="forex" id="img" width="50%" /></h1>
- </div>
- <div data-role="header" data-theme="d">
- <h1 id="appenh11">Appen</h1>
- </div>
- </div>
-
- <div data-role="content" style="text-align:center;" id="index">
-
- </div>
-
- <div data-role="footer" data-id="footer_" data-theme="b" data-position="fixed" data-tap-toggle="false">
- <div data-role="navbar" class="customnavbar" >
- <ul>
- <li><a id="appenviewbtn" data-icon="custom" id="" class="iconhome ui-btn-active ui-state-persist" data-transition="none">Splitta</a>
- <li><a id="restipsviewbtn" data-icon="custom" class="iconlight" data-transition="none">Restips</a>
- <li><a id="sparaviewbtn" data-icon="custom" class="iconprice" data-transition="none">Spara</a>
- <li><a id="merviewbtn" data-icon="custom" class="iconstar" data-transition="none">Mer</a>
- </ul>
- </div>
- </div>
And this is the javascript:
- $(document)
- .on('pageinit', function()
- {
- $("#appenviewbtn").click( function(){
- //header
- $('#backBtn_').remove();
- $('#appenh11').text('Appen');
- //body
- var pageContent = '<br/>\
- <p>Welcome!</p>\
- <br/>\
- <a id="newTripBtn" data-role="button" data-theme="e" data-transition="none">Ny resa</a>\
- <a id="ongoingTripBtn" data-role="button" data-theme="e" data-transition="none">Pågående resa</a>\
- <a id="finishedTripsBtn" data-role="button" data-theme="e" data-transition="none">Avslutade</a>';
-
- $('#index').html(pageContent);
- $('#index').trigger('create');
- addSplittaClickListeners();
- });
There's a GUI problem when I switch from a scrolled tab to a tab that can't be scrolled that far. If I'm located at tab two in my app, which contains a list, and scroll down to the bottom of that list, and then tap tab 1, which doesn't even need the whole height of the screen, then tab 2 will be autoscrolled to the top, wait for like 1-2 tenths of a sec, and then the new content will be set. During the waiting, the list, in it's full screen height, will be… black. Not the whole screen but the actual list.
If I, similarly, scroll down just half a screen and then switch tab, then the bottom half of the list will be black during the wait. Consistently, the same height difference / numbers of pixels between the scrolled down page and the maximum scroll down of the switch-to tab page (if the switch-to tab page is "lower/lesser height" than the current tab page) will be black for that period of time (100-200 msec). The rest of the list will be just blank.
This's not only happening with the list but with every page where the scrolled down height of the current tab is greater than the height of the switch-to tab.
It's only visible on iPhone, not on Android devices. Does someone know a fix for this?