jaunesarmiento / fries

Fries helps you prototype Android apps using HTML, CSS, and JavaScript.
MIT License
1.55k stars 222 forks source link

Tabbed navigation not working in desktop browser only with Phonegap #12

Closed aymanfarhat closed 11 years ago

aymanfarhat commented 11 years ago

I am implementing a tabbed navigation just like in the Fries sample, it is working fine with Phonegap but the tabs are not working on Chrome(Desktop) neither FF when clicking on them, any ideas what could be the problem? What is odd is that in the demo on the site they're working fine, could be a different version?

Note: there are no errors what so ever on the console. Here is my code if you'd like to take a look https://gist.github.com/aymanfarhat/5729462

jaunesarmiento commented 11 years ago

Hi @aymanfarhat, the JavaScript library of Fries uses touch events that's why it doesn't work on your desktop browser. I'm still working on catching clicks and converting them to touch events.

In the meantime, kindly use a library that converts click events to touch events. Or a more hacky solution is to edit Fries' JavaScript files and replace touchstart or touchend to click.

Hope that helps!

aymanfarhat commented 11 years ago

Oh I see we'll find a way around it then, thanks for the reply and keep up the good work :)

jaunesarmiento commented 11 years ago

Alright cheers! :)

aymanfarhat commented 11 years ago

By the way turns out the least hackish way is to just enable emulating touch event via Chrome developer tools for debugging the app within the browser https://developers.google.com/chrome-developer-tools/docs/mobile-emulation#emulate-touch-events

jaunesarmiento commented 11 years ago

Oh, right. I completely forgot about that. Yes, that's the least hacky way to do it.