Page 1 of 2

Navbar, long list, two scrolls

Posted: Mon Feb 04, 2013 10:21 am
by Andrew Majskiy

Hello! I have several problems with Tiggzi Builder.
1) When I set padding option to 0 to the mobilecontainer I have the next:
http://easycaptures.com/fs/uploaded/5...
http://easycaptures.com/fs/uploaded/5...
But in virtual device it looks good.
2) When I navigate through the navbar it makes the wrong active tab. But in each page where I use navbar I set active tab in properties.
http://easycaptures.com/fs/uploaded/5...
It seems activate tab of the page that was visited previously.
3)In case I have very long list in Browser Test it displays two scrolls.
http://easycaptures.com/fs/uploaded/5...
But in virtual device it also looks good.


Navbar, long list, two scrolls

Posted: Mon Feb 04, 2013 11:58 am
by Maryna Brodina

Hello!

1) I can't reproduce it. Please take a look at the screenshot

Image

and the same on preview (tested in Chrome and Firefox)

Image

2) On every page, on page Show run next code:

code var navbar = $("[data-role='navbar']:visible");
if($('.tg-state-persist', navbar).length == 0) {
$(".ui-btn-active", navbar).addClass('tg-state-persist');
} else {
$(".ui-btn-active", navbar).removeClass('ui-btn-active');
$(".tg-state-persist", navbar).addClass('ui-btn-active');
}
/code

It's how jQuery Mobile works.

You load Page 1 with a NavBar component. The first tab is selected. The page is now in browser DOM.
You click on the 2nd tab. jQuery Mobile makes the 2nd tab active and then loads Page 2.
On Page 2, the 2nd tab is active.
On Page 2, you click on 1st tab to go back.
Page 1 was already loaded and is now in browser DOM. As the page is in the DOM, it is simply shown (not loaded). Its last state - 2nd tab was active (from navigation).

jQuery Mobile has a fixed NavBar: http://jquerymobile.com/demos/1.1.1/d... (we don't have it yet in the palette). This one would work as expected. The code that I sent you takes the current NavBar component and makes it a persistent NavBar.

3) It's just the browser feature, you won't see scroll bar on real device.


Navbar, long list, two scrolls

Posted: Mon Feb 04, 2013 12:11 pm
by Andrew Majskiy

"1) I can't reproduce it. Please take a look at the screenshot "
http://easycaptures.com/fs/uploaded/5...


Navbar, long list, two scrolls

Posted: Mon Feb 04, 2013 12:15 pm
by Maryna Brodina

Thank you for clarification. It's a bug.


Navbar, long list, two scrolls

Posted: Mon Feb 04, 2013 12:27 pm
by Andrew Majskiy

I have one more problem... In case I get empty response from the service (there is no news in category for example) I get an error in console. Image
and can not use any custom js.


Navbar, long list, two scrolls

Posted: Mon Feb 04, 2013 4:12 pm
by Kateryna Grynko

Hello Andrew!

For the Rest service, it's expected to get correct json in response. The error is caused by service gets an empty line.

It would be correctly to get an empty json {}.
If you can't make changes on server side you should use Complete or Error Rest service events.


Navbar, long list, two scrolls

Posted: Tue Feb 05, 2013 10:34 am
by Andrew Majskiy

I tried to use Complete or Error Rest service events in this case. But I have all the same error and my actions, that I invoke, not satisfied.


Navbar, long list, two scrolls

Posted: Tue Feb 05, 2013 11:05 am
by Maryna Brodina

Hello! Please make your app link public and send us that link so we can test it.


Navbar, long list, two scrolls

Posted: Tue Feb 05, 2013 11:07 am
by Andrew Majskiy

Navbar, long list, two scrolls

Posted: Tue Feb 05, 2013 11:16 am
by Maryna Brodina

Thank you. We'll test and I update.