app-UI icon indicating copy to clipboard operation
app-UI copied to clipboard

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

Open rahal opened this issue 12 years ago • 2 comments

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.

rahal avatar Feb 14 '13 17:02 rahal

@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.

rkumar670 avatar Feb 18 '13 17:02 rkumar670

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];

rahal avatar Feb 20 '13 18:02 rahal