Odd (inconsistent) link behaviour


#1

I have a series of popups all using code similar to this:

"<img src='images/ads/hobbs-logo.png' width='240' height='117' align='middle'/><br /><h4>Hobbs of Henley</h4><br/><img src='images/ads/hobbs-1.jpg' width='240' height='162' align='middle'/><br />Facilities: PO | W | P | D</b><br /><div><a href='tel:+441491572035 ' class='external'>Telephone:  01491572035</a><br/><li>Public river cruises</li><li>Private and corporate events</li><li>Self drive boats for hire </li><li>Boat storage</li><li>Boat servicing and repairs</li><li>Henley Royal Regatta trips and river taxis</li><li>Rewind Festival river taxis</li><li>Henley Boat Club</li><li>Serving Thames boaters since 1870</li><br/><a href='#' class='link popup-open show-webemail-button' data-popup='.popup-hobbs-web'>Web site</a>&nbsp;<a href='#' data-popup='.popup-hobbs-email' class='link popup-open show-webemail-button'>Email</a> <br/><br/><img src='images/ads/hobbs-2.jpg' width='240' height='82' align='middle'/><br/></a><br/><img src='css/logos/bmflogo-proud.png' width='150' height='74' align='middle'/>"

In desktop Safari the two button links (‘Web site’ and ‘Email’ work fine. In the simulator and on iOS devices the buttons links do nothing (no response to tapping). Any guidance on fixing this will be much appreciated…
thanks


#2

can you share your config.xml?

i had same issue a while a go, i use f7-vue,
solve it like this:

    openPhone(phone){
      if (device.platform === 'Android') {
          window.open('tel:' + phone, '_system');
      } else {
          document.location.href = 'tel:' + phone;
      }
    },
    openMail(email){
      if (device.platform=== 'Android') {
          window.open('mailto:' + email, '_system');
      } else {
          document.location.href = 'mailto:' + email;
      }
    }

#3

Thanks for the reply - but this does not solve my issue.
The problem is trying to open a popup (which deals with the web or email) - this section of my code does nothing when tapped:

<a href='#' class='link popup-open show-webemail-button' data-popup='.popup-hobbs-web'>Web site</a>&nbsp;<a href='#' data-popup='.popup-hobbs-email' class='link popup-open show-webemail-button'>Email</a>

Suggestions appreciated…


#4

can you share your config.xml?


#5

Sure - here it is:

<?xml version='1.0' encoding='utf-8'?> <widget id="com.jeffmaynard.riverthames" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <preference name="AllowInlineMediaPlayback" value="false" /> <preference name="BackupWebStorage" value="cloud" /> <preference name="DisallowOverscroll" value="false" /> <preference name="EnableViewportScale" value="false" /> <preference name="KeyboardDisplayRequiresUserAction" value="true" /> <preference name="MediaPlaybackRequiresUserAction" value="false" /> <preference name="SuppressesIncrementalRendering" value="false" /> <preference name="GapBetweenPages" value="0" /> <preference name="PageLength" value="0" /> <preference name="PaginationBreakingMode" value="page" /> <preference name="PaginationMode" value="unpaginated" /> <preference name="StatusBarOverlaysWebView" value="true" /> <feature name="LocalStorage"> <param name="ios-package" value="CDVLocalStorage" /> </feature> <feature name="Geolocation"> <param name="ios-package" value="CDVLocation" /> </feature> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> <name>RiverThames</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <author email="[email protected]" href="http://cordova.io"> Apache Cordova Team </author> <content src="index.html" /> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <gap:plugin name="org.apache.cordova.geolocation" /> <feature name="Geolocation"> <param name="ios-package" value="CDVLocation" /> </feature> </widget>
thanks


#6

You need to install cordova inapp browser plugin. And then to open any external link (or tel/mailto) links as:

<a href="tel:123123" class="external" target="_system">

#7

Vlad
many thanks for responding - but this is not the problem I am having. I want to open a popup from within a popup - this works in Safari desktop but not in the simulator or iOS (the second popup has the email and web links and they work fine).
The issue is that the second popup does not open…
thanks again