Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Frozen Screen on statechange and handlebar switch only on safari iPad #560

Closed
MiL00 opened this Issue · 1 comment

2 participants

@MiL00

Hello everyone

we are developing an app with handlebars. Everything fine so far. In our app you got a plus/add button in the corner of the first view.
On mouseUp: function will call a Statechange

here the code

addButton : SC.TemplateView.extend({
    classNames: [ "inlineView" ],
    mouseUp: function() {
        Timer.statechart.sendEvent( 'changeStateToSomeThing' );     
    },
    touchStart: function() {
        this.mouseUp();
    }
    })

ok everything fine till now. Here a new screen/handlebar will load.
The next screen has a cancel button in the top right corner.
On click on the cancel button it should be possible to get to the last (the starting screen) which was
visible the at least.

the statechange is like:

rootState: Ki.State.design({
        initialSubstate: 'loggedOut',

        /*********************loggedIn state*****************************/
        loggedIn: Ki.State.design({

            enterState: function(){
                Timer.firstController.init();
                Timer.mainPane = SC.TemplatePane.append({layerId: "first",templateName: "first"});
            },
            exitState: function(){
                Timer.mainPane.remove();
            },
            logout: function(){
                this.gotoState('loggedOut');
            },
            changeStateToSomeThing: function(){
                this.gotoState('SomeThing');
            }
        }),

        /************************loggedOut State*************************/
        loggedOut: Ki.State.design({
            enterState: function(){
                Timer.mainPane = SC.TemplatePane.append({layerId: "login",templateName: "login"});
            },
            exitState: function(){
                Timer.mainPane.remove();
            },

            // it login so later fehler
            login: function(){
                this.gotoState('loggedIn');
            }

        }),

        /**************************Projekte State************************/

        SomeThing: Ki.State.design({
            enterState: function(){
                SC.TemplatePane.append({layerId: "splitvtew",templateName: "splitview"});
                Timer.splitController.initScrollers();
            },
            exitState: function(){
                Timer.mainPane.remove();
                Timer.splitController.clearTimeouts();
            },
            complete: function(){
                this.gotoState('loggedIn');

            }
        })
    })

The code for the cancel Button

 completeButton : SC.TemplateView.extend({
    classNames: [ "inlineView" ],
    mouseUp: function() {
        Timer.subtaskController.complete();
    },
    touchStart: function() {
        this.mouseUp();
    }
    })

the Timer.subtaskController.complete():

    cancel: function(){
    Timer.statechart.sendEvent( 'complete' );
    Timer.splitController.set( "completeButton", "Cancel" )
    }

If i am running this in Fast Browser (App from appstore for ipad) or iCabMobile (The same) its working fine, also the buttons working great.

But: If i use the same code on the iPad in Safari i could trigger the button only a few times, after everyhing is frozen.
No more reaction to any button if i click on the Add button or i am stuck in the second screen and no more reaction on the cancel button.

Could anyone tell me what the problem could or should be? Any ideas?

What i tried so far: Deleted all contents on the second screen, one the button was there and the same. Deleted all json requests (thought it hung
up in a loop). Put button on several other handlebars. Nothing worked so far

Would be glad for help.

Greetz and Thanks so far for reading :)

@publickeating

Sorry, I don't know why no one commented on this. Closing due to being stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.