cordovaanchorjqtouchiscroll4

tel anchor link not working with jqtouch and phonegap


I'm using phonegap with jqtouch and am trying to very simply open the phone's native phone app and prompt a call. I've tried all sorts of variations on the following:

<a href="tel:[NUMBER]" class="greenButton>Call number</a>

I've tried rel="external"

I've tried using href="tel://"

I've tried target="_blank"

I've tried target="_webapp"

I've even tried adding class="tel" and using jQuery to call $(location).attr('href',this.href);

Basically, jqtouch must be intercepting links to do it's thing and I can't figure out how to make it do things normally!

I've found something odd however...
If I wrap the link in an iscroll wrapper it works.

<div class="s-scrollwrapper">
<a href="tel:[NUMBER]" class="greenButton">Call number</a>
</div>

I obviously don't want to settle for this because it screws up formatting and makes the button scrollable and is pointless. Can anyone help me please?


Solution

  • This did turn out to be the way jqtouch intercepts click events and prevents default behaviour. The way I ended up "fixing" it was to put an 's-scrollwrapper' div around the content on the page with the call button. I needed to do this anyway for all screens of the app but as for this datazombies fork, it probably needs a better way to implement tel links.