Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Device: Bold 9900

Page cut-off on back button

I have 3 forms linked sequentially. 

 

form1 > form2 >form3

 

form1 is tall with many fields so it has a scroll while form 2 and form3 dont.

 

Going from form1>form2>form3 is no issue but when i go from form3>form2>form1, the form1 page gets cut off at the height of the window and I can no longer scroll the page.

 

Any idea why?

Please use plain text.
Developer
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900

Re: Page cut-off on back button

if you have this line:  <meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no"/>

the frame is set to load scren size of what shows up first.  So if form 1 shows up first it'll fit the others. If form 2/3 shows up first, it wont fit the first. Try using div containers or tables to fix the frame of ur app then u will hopefuly not run into these issues.


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Device: Bold 9900

Re: Page cut-off on back button

This is my viewport
<meta name="viewport" content="width=device-width,target-densitydpi=device-dpi,user-scalable=no,initial-scale=1.0">

Also, double checked, only form2 & 3 have the screenheight restriction
Please use plain text.
New Developer
michaelwpg
Posts: 11
Registered: ‎04-15-2012
My Device: Playbook 16GB

Re: Page cut-off on back button

My question here would be if your back button click event is causing the viewport to re-render. If you are rendering your viewport based on the above criteria "on click" to go forward, it would make sense that they scale properly. However, if it is not being called during the back button function, the same viewport would remain, causing no issue with "form2" (since it is the same size as "form3" but would obviously not fit "form1".

I may be way off base, but it seems logical to me.
Please use plain text.
Trusted Contributor
zahirw
Posts: 134
Registered: ‎04-15-2012
My Device: Bold 9900

Re: Page cut-off on back button

I do agree, so how can this be handled?
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Page cut-off on back button

Are you changing the URL of the page when you are moving between the forms?  or are you reloading screens via AJAX or changing visibility of different divs?

 

The BrowserField control used to render content in a WebWorks app grows to the height of the content in the page.  What I've always done is set the height of the body to the height of the screen via CSS just in case the viewport tags get messed up.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.