Hi guys,
I've been scraching my head for some time about a problem i've encountered. Maybe some of you have an answer.
If you have an anchor-tag like this: <a id="mybutton" href="#">my button</a> and you click just outside the anchor element on mobile safari, the default behaviour of the anchor tag is executed. Even if you have custom events bound to the anchor tag these are not executed.
If you press inside the anchor element it works as expected (executing the custom event). Return false, event.preventDefault() for all anchortags with # as href does not work as a solution.
I've uploaded a movie showing the problem in the attached link.
Hope any of you guys have a reasonable explanation for this weird behavior
Thanks.
http://filer.wedelgaard.dk/testMovie.m4v
I've been scraching my head for some time about a problem i've encountered. Maybe some of you have an answer.
If you have an anchor-tag like this: <a id="mybutton" href="#">my button</a> and you click just outside the anchor element on mobile safari, the default behaviour of the anchor tag is executed. Even if you have custom events bound to the anchor tag these are not executed.
If you press inside the anchor element it works as expected (executing the custom event). Return false, event.preventDefault() for all anchortags with # as href does not work as a solution.
I've uploaded a movie showing the problem in the attached link.
Hope any of you guys have a reasonable explanation for this weird behavior
Thanks.
http://filer.wedelgaard.dk/testMovie.m4v