dmachi / dojox_application

Dojox Application Framework for mobile, tablets, and desktops
Other
27 stars 24 forks source link

Transitioning View Fails Randomly #203

Closed rdaggett closed 11 years ago

rdaggett commented 11 years ago

HI there, I am trying to use dojox/app for a Single Page Desktop Application. I currently have 2 pages. my view is setup with a template being an html and the controller is creating a dgrid programmatically and attaching it to the div in the view. Then I have the view changing after you click on on the row. That goes to the second page which has a form with a cancel button.

Everything works but when I click on the row the page changes and I can go back and forth between the pages when I click cancel. Everything work up to a certain point. However, it will randomly stop transitioning between the views and it seems to get stuck on one page even tho the hash changes to the view I want.

Is this a bug? What's really weird is that the page switching stops after 3 transitions and sometimes it takes 6 times before it decides not switch and gets stuck.

Help would be appreciated on this issue.

Thanks

here's my 2 views:

"list":{ "constraint": "center", "controller": "./controllers/list" //"template": "./views/list.html" },

    "details"
        "constraint": "center",
        "controller": "./controllers/details",
        "template": "./views/details.html"
    },
rdaggett commented 11 years ago

Please note: I found that this behavior happens only when using a transition other than "none".

edchat commented 11 years ago

I have seen a similar problem, which I think is caused by a problem in the css3/transition.js code.

My problem can be seen by using the mediaQuery3ColumnApp. To reproduce the problem update the config.json like this:

        "isInitiallySmall" : {
            //the name of the view to load when the app is initialized.
            "defaultView": "navLeft+navCenter"
        },

And then from a phone sized browser screen hit the mediaQuery3ColumnApp test with the following params.

dojox/app/tests/mediaQuery3ColumnApp/#navLeft+lastCenter+lastRight You will notice that no transitions will occur after this is displayed (without the fix).

It looks to me like the "on.once(args[args.length-1].node, transitionEndEventName, function(){" on line 348 is not being fired for the lastRight. I see start() being called for lastRight, but the on.once(lastRightNode, transitionEndEventName is not being hit, so self.clear for lastRight is not being called.

Christophe indicated that there are some cases where the transitionEndEvent is not fired, and we have code to try to handle those situations. This case does not seem to be handled. I have a possible fix, but it adds another setTimeout call, so I am not thrilled with it.

silverelf I can send you my updated css3/transition.js if you would like to test it.

rdaggett commented 11 years ago

Thank you for your response. And yes I would be happy to test that for you.

edchat commented 11 years ago

silverelf I think I will need an email address to send the update for you to test, if you would rather email it to me than add it here, you can email me at ed.chatelain at gmail dot com. Thanks

rdaggett commented 11 years ago

sorry, left out my email. silver_elfs@hotmail.com

rdaggett commented 11 years ago

Thank you so much! It seems to be working just fine. I have tried both the slide and fade transitions.

rdaggett commented 11 years ago

I left out the version of dojo I was using when experiencing this. I was using 1.9.0. However after upgrading to 1.9.1 for the first time today, the issue seems to back even with the updated Transition.js. So for some reason dojo version 1.9.0 seems to be working fine, but 1.9.1 does not even with the latest Transition.js file. The hash changes on the URL, but the transition does not happen. I am using transitionToView function to switch between the views.

What version did you use when fixing this?

edchat commented 11 years ago

Hi, there have been two updates which I have had people test, one was dojox/app/controllers/Transition.js and the other was dojox/css3/transition.js. I one that fixed this problem was dojox/css3/transition.js, is that the one you tested with? Neither of these fixes have been committed yet, but they should both be in soon.

rdaggett commented 11 years ago

Ok the only file that I have received was the controller/Transition.js I did not get the css/transition.js On Jul 8, 2013 4:48 PM, "Ed Chatelain" notifications@github.com wrote:

Hi, there have been two updates which I have had people test, one was dojox/app/controllers/Transition.js and the other was dojox/css3/transition.js. I one that fixed this problem was dojox/css3/transition.js, is that the one you tested with? Neither of these fixes have been committed yet, but they should both be in soon.

— Reply to this email directly or view it on GitHubhttps://github.com/dmachi/dojox_application/issues/203#issuecomment-20644514 .

rdaggett commented 11 years ago

Thanks! I was able to upgrade to dojo 1.9.1 and used that patch for dojox/css3/transition.js and that seems to fix the issue.

edchat commented 11 years ago

The fix for dojox/css3/transition.js has been committed, it will be in 1.9.2, the fix went in with this ticket: https://bugs.dojotoolkit.org/ticket/17279