Pathgather / please-wait

A simple library to show your users a beautiful splash page while your application loads.
http://pathgather.github.io/please-wait/
MIT License
1.59k stars 155 forks source link

Loading screen won't close on Android default browser #5

Closed samwalshnz closed 6 years ago

samwalshnz commented 9 years ago

As title says. It doesn't seem to show any javascript errors either, I believe.

jhdavids8 commented 9 years ago

Hi @samwalshnz I was able to get the screen to close, but the page in the background didn't load for me when testing the demo page. It worked for me in Android Chrome, so I'd say the problem I saw was with transitions/CSS prefixes. But to clarify, you can't close the screen at all? If so, can you verify that you can reproduce your issue on the demo page? Thanks!

samwalshnz commented 9 years ago

Yeah I'm seeing the same thing happen as you. The demo page closes the loader, but doesn't show the page, but my web app just doesn't hide the loader at all. Any ideas how to debug Android Default Browser on a Mac?

jhdavids8 commented 9 years ago

Hi @samwalshnz, sorry for the delayed response! Unfortunately, I have no experience debugging Android browsers.

If I had to guess, this is probably an issue with the transitions in the CSS file in fading the screen out and the background in, so that might be a good place to start looking. You could also include something like Sentry/Honeybadger in your app to see if a Javascript error is reported, but given what I'm hearing, I'm thinking this is just a CSS error...

I'll try to get to this soon, but I can't guarantee a quick turnaround, as I'm swamped with other things. If you can figure it out before me and submit a PR, I'd very much appreciate it!

qrtise commented 9 years ago

Hi I had this issue but it was not a fault of pleasewait but my lack of skill, with a little help from Neville Samuell I was able to close the splash on a timer here's my code.

placed in HTML

<script>

    window.onload=function(){
        window.setTimeout(function(){
            loading_screen.finish();
        },3000);

    }
</script>

hope this helps

uzumakinaruto123 commented 8 years ago

this is a issue on every android browser i guess ! still not working ..

any help is appreciated

dangnelson commented 8 years ago

+1

dangnelson commented 8 years ago

What I ended up doing:

var ua = navigator.userAgent;
var is_native_android = ((ua.indexOf('Mozilla/5.0') > -1 && ua.indexOf('Android ') > -1 && ua.indexOf('AppleWebKit') > -1) && (ua.indexOf('Version') > -1));

if(!is_native_android){
  window.loading_screen = window.pleaseWait({ // HTML
  });
}