Form behavior problem after rotate

I haven’t been coding much in the last few years other than some minor maintenance of my apps. However, maybe something has been deprecated, but I have an issue where I can find a solution. I also can see the same problem with one of the sample programs called FooterBar.

I’ve attached a very small simple app I wrote a few years ago that demonstrates the issue, but as I indicated above, the sample app FooterBar exhibits the same behavior. I use to be able to rotate it to landscape where everything looked fine, then rotate it back to portrait … again with everything looking great. Now when I rotate to landscape the headerbar gets messed up and when I rotate to back to portrait the form is cut off at the bottom (dead space with background color).

I use an iPhone 5s with my webapp served from Volt. I run the app after being saved to homescreen.

Thanks in advance for any advice/help to solve this issueSysInfoX.nsx (47.0 KB)
.

The sample app can be run from here: https://sysinfox-fools-solemnly.volt.live/

Bob Anderson

I agree - there is something not right here. I’m not sure if there is a quick fix, but there may be a workaround.

Try adding a statement like this to your app:

FooterBar1.style.top = "calc(100% - 60px)"

Thanks.

I just tried this suggestion but unfortunately there was no change in behavior.

Is there any chance it could be because my jQuery theme is out of date?

Best regards,

Bob

It doesn’t have anything to do with the theme - as you noted, the FooterBar sample has the same behaviour.

Where did you put this code? It should work in Sub Main or onorientation event.

Thanks again for your help. I tried what you suggested and unfortunately could not find a way to make it work for my problem.

I took another shot at this and after a lot of trial and error I found a patch that works. I added:

window.innerHeight=SysInfo(1)

as my first line of code in Sub Main()

It turns out that the issue wasn’t that the footerbar was off the bottom of the screen, it was that the window.innerHeight is not correct after returning from an orientation change (it’s way too short). Setting it to SysInfo(1) corrects it.

The only issue I now have is that after returning from landscape to portrait the window is shifted up about 10 pixels (part way under the statusbar), however if you slide it downwards it bounces back into the correct place.