Hiding the address bar in mobile Firefox
Asked Answered
O

3

6

I have tried the various scrollTo() solutions which hide the address bar in a mobile browser, but none of them seem to work at all in mobile Firefox.

Is there a different trick which needs to be used in that situation?

Otalgia answered 23/4, 2013 at 23:17 Comment(4)
The scrollTo() solution works perfectly only if your page height is bigger than the device screen. The scrollto event is going to undisplay the top bar by scroling to the bottom of the page (30px for safari on iphone). But, if your page height is less than the screen the screen of your device + 30px, the event can't work.Jim
page height doesn't seem to matter. the problem seems to be mobile firefoxOtalgia
There was a movement in browser development when almost all players added some form of uneditable URL bars to all popup windows which used to be completely clutter-free. I think it's meant as a security feature.Harp
Try this one: #5856469Steffy
D
3

If you're in charge of writing the pages that you want fullscreen, you can run these littl bits of code to use the API:

function setFullScreen(el) {

    if (el.requestFullscreen) {
        el.requestFullscreen();
    } else if (el.msRequestFullscreen) {
        el.msRequestFullscreen();
    }else if (el.mozRequestFullScreen) {
        el.mozRequestFullScreen();
    }else if (el.webkitRequestFullscreen) {
        el.webkitRequestFullscreen();
    }
}

function exitFullScreen(){
    if (document.exitFullscreen) {
        document.exitFullscreen();
    } else if (document.msExitFullscreen) {
        document.msExitFullscreen();
    }else if (document.mozCancelFullScreen) {
        document.mozCancelFullScreen();
    }else if (document.webkitCancelFullScreen) {
        document.webkitCancelFullScreen();
    }
}

function toggleFullScreen(){
    if(!document.fullscreenElement && !document.msFullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement){
        setFullScreen(document.documentElement);
    }else{
        exitFullScreen();
    }
}
Debark answered 11/11, 2016 at 19:40 Comment(1)
Works a treat on an old Android 4.4 media stick once I set full-screen-api.allow-trusted-requests-only to false in firefox's about:configWhacky
B
0

You have to make browser go to full screen mode to achieve that.

For mobile FF you have to create manifest and at there:

"fullscreen": "true"

https://developer.mozilla.org/en-US/Apps/Build/Manifest#fullscreen

Badillo answered 10/7, 2014 at 0:22 Comment(1)
The question is about firefox mobile (which is an android app) and your answer is about firefox OS. I tried it on a Google Tango with android 4.2 and firefox browser, but this fullscreen trick does not work.Kellum
K
-2

No, there is no way at this moment to do this in mobile firefox. Not even the scrollTo() trick or a manifest file.

Kellum answered 19/10, 2016 at 7:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.