Switching full screen on and off on different pages


#1

Hello

I m using
ionic.Platform.fullScreen(true, false);
and
ionic.Platform.fullScreen(false, true);
to activate/deactivate full screen mode in my app

but

  1. there is a bug in the showStatusBar (https://github.com/driftyco/ionic/issues/702)
  2. when running on the device or in ios simulator, every time you go in or out, the view height gets bigger and bigger and the footer becomes unvisible…

Any idea whats going on?

Cheers


#2

I’ve seen this before. I think it actually is an issue with the Cordova StatusBar plugin itself.


#3

Thanks. Do you know where i could find more info? i cant seem to google that particular issue…


#4

It would be a very ugly hack, but you might consider a page reload.

Even if it’s not a permanent solution, could you try it as a test after toggling fullSCreen ?

window.location.reload();


#5

i dont think it helps because i get stuck in a loop if i call the window.location.reload() after each toggle. the fullscreen class is not applied to the body anymore after a reload, so i dont have a way to know if i should could the toggle or not …


#6

ok i cached a fullscreen flag in the localstorage to prevent the loop, but even after a window.location.reload the viewport height is wrong…


#7

Ok i found the solution. there is indeed a bug in the status bar plugin
See this commit

Nothing to do with ionic :slight_smile: