x404.co.uk
http://www.x404.co.uk/forum/

Name & Phone Number open a map location in iOS mail
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=25909
Page 1 of 1

Author:  BigRedX [ Fri Nov 18, 2016 9:50 am ]
Post subject:  Name & Phone Number open a map location in iOS mail

I have a bit of a weird problem.

In an HTML email I am currently building iOS mail is rendering the person's name and the first part of the telephone number as a map location and opens the Maps app and goes to that location when I click on it.

How do I prevent this from happening? I've wrapped the whole telephone number in a SPAN tag and made it a tel: link, but if I click the name or the area code it activates the Maps link rather than dialling the telephone number. Also the whole text block has a very thin underline on it, with a thicker (normal link thickness) one under the area code only, even though I have set "text-decoration: none". I assume this is part of the same problem.

It only occurs in iOS mail. Everywhere else only the telephone number is clickable and it dials the number.

Any ideas? I'm partly hampered in my search by not being able to articulate the problem in a way that gives me any useful results.

Author:  big_D [ Fri Nov 18, 2016 3:48 pm ]
Post subject:  Re: Name & Phone Number open a map location in iOS mail

From past experience, use a different mail client. :(

I had similar arguments with my previous boss. iOS Mail was doing funny things to a newsletter and nothing that we could do would get iOS to render it correctly. We just had to stop trying to do the relevant formatting or accept that iOS can't display emails properly, because it does its own internal formatting.

Author:  BigRedX [ Mon Nov 21, 2016 12:45 pm ]
Post subject:  Re: Name & Phone Number open a map location in iOS mail

Big_D, you of all people should know that it is totally unfeasible to expect people to switch email clients simply so that they can see marketing emails properly.

The problem is that is not with the email client, but that iOS is trying to be more clever than it should, added to the fact that it just so happens that the combination of the name and the area code of the phone number corresponds to a street name and ZIP code in the US. I suspect that I would get the same result if this occurred on a web page too.

Anyway, the issue is now "fixed" as the client wanted that part of the email laying out differently (without even noticing that there was a problem), so the name and the telephone number is now in separate TD elements, and iOS no longer thinks they are an address.

Author:  big_D [ Tue Nov 22, 2016 11:27 am ]
Post subject:  Re: Name & Phone Number open a map location in iOS mail

That was supposed to be ironic, sorry.

Yes, it is iOS trying to be clever. So as a developer of said mails, you either have to accept that iOS / Apple Mail will screw around with the formatting and get on with your life or you need to reposition elements, so that iOS doesn't mess with it (which is what you did).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/