jaunesarmiento / fries

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

prevenDefault() in stack.js and tel hyperlinks #13

Closed aymanfarhat closed 11 years ago

aymanfarhat commented 11 years ago

Hello I just noticed that the touch handler in stack.js , which is catching all touch events in the app has e.preventDefault() which is preventing default actions for some elements such as hyperlinks with telephones to open the dialer.

I can just remove it and make it work but what I am concerned about is whether removing it might interfere with the stack.js functionality, any thoughts regarding that? Thanks.

jaunesarmiento commented 11 years ago

You may add the data attribute data-ignore="true" to your links so stack.js ignores them. :)

aymanfarhat commented 11 years ago

Actually data-ignore doesn't seem to work, the only time when a tel in a hyperlink is working is when I totally remove stack.js from the page...

jaunesarmiento commented 11 years ago

Really? That's odd. I'm pretty sure I only call preventDefault() after it has checked the data-ignore data attribute. I'll take a look at the code later today when I get the time.

aymanfarhat commented 11 years ago

Issue fixed https://github.com/jaunesarmiento/fries/pull/14