ASPMenu in Safari 7.1 Not Rendering Properly in SharePoint 2010

淺唱寂寞╮ 提交于 2019-12-23 07:49:27

问题


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!


回答1:


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”



来源:https://stackoverflow.com/questions/25936427/aspmenu-in-safari-7-1-not-rendering-properly-in-sharepoint-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!