sharepointsharepoint-2010safariaspmenu

ASPMenu in Safari 7.1 Not Rendering Properly in SharePoint 2010


Has anyone else encountered an issue with the newest release of Safari 7.1 on Mac and iOS8 that breaks an ASPMenu control within SharePoint 2010? The ASPMenu worked fine before hand, but now after the update it has decided to render the contents incorrectly. I've tried setting the Page.ClientTarget = "uplevel", as well as modify the compat.browser file to include the adapter "System.Web.UI.WebControls.Menu" for Safari, but neither option is helping fix the issue.

Can anyone help? The menu worked completely fine before the Safari update. Thanks!


Solution

  • Ended up figuring out what the issue was. In the past, the browser ID that the server would see for Safari was "Safar1Plus". This correlates with the entry in the compat.browser file as listed:

    <browser id="Safari2" parentID="Safari1Plus">
        <controlAdapters>
            <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
        </controlAdapters>
    </browser>
    

    Safari 7.1 no longer ties to the this browser ID, and has now been updated to "Safari60". I found this out by doing a simple command in javascript on my custom SharePoint page:

    alert("<%=Request.Browser.Id %>");
    

    This told me the new browser ID that the server sees. It reported back now as "Safari60". I then went back into the compat.browser file under my web application and added a new browser and referenced the new browser ID:

    <browser refID="Safari60">
        <controlAdapters>
            <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
        </controlAdapters>
    </browser>
    

    Once I saved the compat.browser file with this new addition, Safari 7.1 was now happy and rendering the ASPMenu like it has in the past. Hopefully that helps!

    The default location of the SP browser definition file is at “C:\Inetpub\wwwroot\wss\VirtualDirectories\\App_Browsers\compat.browser”