Wordpress-ios: Webviews: tapping `tel:` or `mailto:` protocol links in a webview results in an "unsupported URL" error

Created on 6 May 2019  ·  10Comments  ·  Source: wordpress-mobile/WordPress-iOS

Steps to reproduce:

  1. Create some links in a post or sidebar widget with the tel: and mailto: link protocols.
    You can use the sample content below.
  2. Save and publish the post.
  3. Tap "View" in the snack bar that shows after the post is published to open a Preview.
    Or you can tap "View" on the post in the Posts List.
  4. Note that the links work in a Preview.
  5. Go to Reader > Followed Sites and find the post.
  6. Tap on the post to open the Reader view and try the links.
  7. Tap the More menu at top right and select "Visit" to open a Webview and try the links.
  8. Go to My Sites > View Site, find the post, and try the links.

Result: tapping on tel: or mailto: links from a Webview results in an "unsupported URL" error, but those same links work normally in Previews and from a mobile browser such as Safari. (2m17s)

Sample content:

<a href="tel:(415) 555 1212">Call (415) 555 1212</a>

<a href="mailto:[email protected]">Send Email</a> 

protocol-links-sample-content   error-unsupported-url

Tested with WP Internal 12.3.0.20190422 on iPhone 6S iOS 12.2 on `design5279.wordpress.com`.

(internal reference: p4a5px-2of-p2 and 1999324-zen)

Mobile Request Webviews [Type] Bug

Most helpful comment

I just ran into this issue with a user who has a Contact Info Widget added to their site and the telephone field filled out. I was able to replicate as well.

cc @designsimply

All 10 comments

Noting some possibly useful Apple and StackOverflow links:

Added to the Groundskeeping project because we've been working recently to improve Webviews interactions.

I just ran into this issue with a user who has a Contact Info Widget added to their site and the telephone field filled out. I was able to replicate as well.

cc @designsimply

Another report in 3385201-zen on version 15.7.

Screen Shot on 2020-10-08 at 11:08:58

The link in the notification is mailto:

Relevant Stack Overflow: https://stackoverflow.com/a/52174457. iOS 13 and below will need special links (tel: mailto: facetime:) handled.

~Interestingly, it works in iOS 14, WPiOS 16.1, with no changes.~ (only in certain places).

Another report in 3479618-zen on version 16.0 / iOS 14.1 for a mailto: link.

These are probably 3 separate classes.

  • [ ] Support common link protocols in Reader posts (ReaderDetailViewController) #15307
  • [ ] Reader > {post} > {more} > Visit (webview) #15310
  • [ ] Notifications > tap a link > (webview) #15310

Part 3. Rough outline of steps to reproduce:

  1. Make sure your test site sends notifications for new followers on your blog.
  2. Have a test site with a Personal Plan (at minimum).
  3. Create a new page and add the Payments block.
  4. Log in with a test account to be the subscriber.
  5. Subscribe to the test site and pay (use a dev testing account).
  6. Go to the app > Notifications and open the subscriber notification.
  7. Tap the "Contact " link in the notification detail view.

Part 3. Notifications > tap a link > (webview) uses the same universal coordinator as Part 2. So the fix is already in place for Part 3.

Timeboxed an attempt to test the payments notification. I couldn't successfully receive a masterbar notification using a testing environment. Once this bug is closed, it would be good to follow up with 3385201-zen to see if the link works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sendhil picture sendhil  ·  30Comments

khaykov picture khaykov  ·  24Comments

sendhil picture sendhil  ·  18Comments

nheagy picture nheagy  ·  36Comments

kwonye picture kwonye  ·  28Comments