triceam / app-UI

app-UI is a collection of user interface components that may be helpful to web and mobile developers for creating interactive applications using HTML and JavaScript, especially those targeting mobile devices. app-UI is a continual work in progress - it was born out of the necessity to have rich & native-feeling interfaces in HTML/JS experiences, and it works great with PhoneGap applications (http://www.phonegap.com). app-UI can easily be styled/customized using CSS.
http://triceam.github.com/app-UI/
Other
1.27k stars 239 forks source link

ViewNavigator's Back Button not working after loading a view containing a youtube video #41

Open rahal opened 11 years ago

rahal commented 11 years ago

After pushing a view containing a youtube video ( via iframe ) , the back button is not working, after some investigations, it appeared that : ViewNavigator.animating is set to true and therefore , ViewNavigator.prototype.popView returns without poping the view.. This behavior doesn't happen all the time, but after some few pushes and pops ( and has been noticed on android ). To fix my problem, I removed the test ( this.animating ) from ViewNavigator.prototype.popView but I'm sure there is a better way to fix this. Thank you.

rkumar670 commented 11 years ago

@rahal is you problem is fix then yes then please add a comment there is not then you post some code there what you used. Thanks.

rahal commented 11 years ago

The problem seems to be resolved, but I'm not sure it is the best way to solve it, here is a diff ( viewnavigator.js ) :


@@ -80,7 +80,7 @@ ViewNavigator.prototype.pushView = function( viewDescriptor ) {

 ViewNavigator.prototype.popView = function() {

-   if (this.animating || this.history.length <= 1 )
+   if ( this.history.length <= 1 )
        return;

    var currentViewDescriptor = this.history[ this.history.length-1];