S1 Mobile Card, navigateToUrl issue

I can’t navigate to a visualforce page from a mobile card, on click any of these links it opens the same mobile card page in full size. here is simplified source of the page used as mobile card:

<apex:page standardController="Contact" showHeader="false" standardStylesheets="false" sidebar="false">
    <a target="_parent/_top/tried all of them" href="{!URLFOR($Page.SomeVFPage)}">Href link</a>
    <a href="#" onclick="sforce.one.navigateToURL('{!URLFOR($Page.SomeVFPage)}')">S1 navigateToURL full</a>
    <a href="#" onclick="sforce.one.navigateToURL('/apex/SomeVFPage')">S1 navigateToURL partial</a>


This is because the <article> element that contains the Visualforce card has an onclick handler for the entire card that takes you to the full size card. You may be able to workaround this by stopping the event propagation if your handler is called prior to the article element’s handler.

You can read more about event propagation and how to stop it for modern browsers at:


Source : Link , Question Author : Abhinav Gupta , Answer Author : Bob Buzzard

Leave a Comment