10

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!

Nick Steenstra
  • 361
  • 2
  • 9
  • It is worth noting that this fixes the same issue in SharePoint 2007 with Safari 6.2. There was an answer that mentioned this worked with 2007 that was deleted. I would not have found a solution to my issue with SP 2007 if I had not seen that answer. – stoj Oct 21 '14 at 16:38

1 Answers1

16

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”

Community
  • 1
  • 1
Nick Steenstra
  • 361
  • 2
  • 9
  • This is an awesome answer. For more info as to why this is happening (and on other issues you might see with iOS 8), http://stackoverflow.com/a/25979199/3486353 is also really helpful. – Sam Hanley Oct 20 '14 at 20:23