1

I am adding a call button to a mobile site

<div class = "button page1"
    <div class = "phone-button">
        <a href = "tel:8885555555">
            <span class = "button">
                <span class = "phone-img"></span>
                <span class = "button-text">Call</span>
            </span>
        </a>
    </div>
</div>

Other than some minor css differences, the call button div's are the same throughout the site. The button works fine on one page, but for all other instances, when the call button is clicked the number pops up for just a second and then disappears bringing up the html in the 'cancel/call' pop-up instead of the phone number. The button works properly on other phones, so does anyone know why it's not working in mobile safari?

UPDATE: the site uses Sencha Touch framework, and I found some old forum posts about a bug there (http://www.sencha.com/forum/showthread.php?153341-tel-link-does-not-work-on-iOS-with-ST-2.x!), but I can't find anything recent.

suhMAN
  • 179
  • 1
  • 4
  • 13
  • Tried without the space between the colon & 1st digit – Alex K. Jan 31 '14 at 17:21
  • 1
    Silly, but I think you may have to remove the space after the colon in "tel: xxxxxxxx" – DiscDev Jan 31 '14 at 17:22
  • @DiscDev It's not silly -- spaces in URLs should be encoded. See [Are URLs allowed to have a space in them?](http://stackoverflow.com/q/497908/643383) – Caleb Jan 31 '14 at 17:26
  • Removing the spacing doesn't seem to do the trick. The call popup still comes up with the phone number for a second, and the disappears with a new call popup with html instead of the number – suhMAN Jan 31 '14 at 17:28
  • I tried telprompt but that actually crashed the site. I'm using sencha framework and I think the bug might actually be there is anyone knows something about that? – suhMAN Jan 31 '14 at 17:58
  • SOLUTION: I commented out Sencha's callPhone function which is supposed to remove html markup, and now the tel link is working – suhMAN Jan 31 '14 at 19:23
  • @user3258210 - you should update the title of your question to mention you're using Sencha, and then post the solution to your own question as a solution instead of a comment to help others in this situation. – DiscDev Feb 03 '14 at 15:14
  • @Caleb - I was only implying that if removing the space fixed it, it's silly because the issue only manifested itself on some, but not all browsers. Silly @ inconsistency with how various browsers parse the html, not silly @ encoding URLS =) – DiscDev Feb 03 '14 at 16:44

1 Answers1

0

Solution: there is a bug in Sencha's framework, so I ended up deleting Sencha's phone-number routing function, and the above code worked fine.

suhMAN
  • 179
  • 1
  • 4
  • 13