beedesk / jQTouch

jQT + actively maintained + exclusive features (iPad layout, iscroll, tons of css enhancements, page events, param passing between pages, radio button, grid, mail, improved page history management etc.)
http://bit.ly/beedesk-jqt
MIT License
72 stars 13 forks source link

Choicepane not choicepane-ish if using goTo #17

Closed l0c0luke closed 13 years ago

l0c0luke commented 13 years ago

I would like to dynamically populate my choicepane. So I tried two methods. One was to dynamically generate the entire div, then use goTo with a slideup to transition to it. The other to have the choicepane already in the DOM and then fill it up with html on click and then use gTo. Both with the same unwanted behaviour. The behaviour is that the choicepane shows up, but makes the page behind disappear so it looks like the choicepane is a whole new page.

Now if I use a regular href="#choicepane" on the link and then also have a onclick to populate the html at the same time, this worked ok in my browser but not on the phone. I presume for some sort of race condition. It would show the choicepane, leave the page behind, but the html was not in the choicepane and I was effectively stuck since the "modal" forced me to refresh page.

thomasyip commented 13 years ago

Thanks for reporting the issue. I haven't tried to do choicepane dynamically. So, might discover gap that I didn't thought of.

I didn't completely understand your scenario. But, I will try to give my best guess anyway. Please correct me if I misunderstood you.

For the goTo part, try adding "smokedglass" as the second parameter. Smokeglass means showing the new page with the current page as background. goTo("#choicepane", "slideup smokedglass");

For the goBack part, if you're generating the html, you need to add "backward" class to the "pushButton", which dismisses the choicepane and go to the next page.

Let me know how it goes.

l0c0luke commented 13 years ago

BALLER! you understood perfectly. When I hit the Cancel (backward) button, it does seem that the page behind comes to the foreground rather quickly. But it works for me. Thanks!

thomasyip commented 13 years ago

Glad that it works for you.