Safari browser and asp:menuhttp://forums.asp.net/t/941229.aspx/1?Safari+browser+and+asp+menuTue, 10 Jan 2012 04:05:27 -05009412291125883http://forums.asp.net/p/941229/1125883.aspx/1?Safari+browser+and+asp+menuSafari browser and asp:menu Hey folks,<br> Having trouble getting the asp:menu to work right on OS X using Safari.<br> The mouseovers simply do not work, and when you click on one of the links, the menu disappears completely.<br> I do have some code-behind on the menu for itemCreated (to cause the parent to be highlighted as selected when a child is selected)<br> <br> Any ideas?<br> -Kevin<br> <br> 2005-11-28T20:02:22-05:001127128http://forums.asp.net/p/941229/1127128.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu Kevin,<br> &nbsp; This is a known issue.&nbsp; First off, Safari gets served the menu adaptor which is fully functional but does not support the dynamic fly-outs.&nbsp; Instead you must click on menu items to see the sub menus.&nbsp; Secondly, there are some style issues with Safari and Menu.&nbsp; I've posted on my blog about these issues and potential workarounds:&nbsp; <br> <br> <a href="http://weblogs.asp.net/dannychen/archive/2005/11/21/431121.aspx">http://weblogs.asp.net/dannychen/archive/2005/11/21/431121.aspx</a><br> <br> --<br> Danny 2005-11-29T20:50:29-05:001128391http://forums.asp.net/p/941229/1128391.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu Hey Danny,<br> <br> Thanks for the reply - I actually checked out your blog - it's the only reference to this problem on the net. (and made your first comment!).&nbsp; The problem seems to be if they click on a menu item that should have a dynamic list appear, then the whole menu disappears. If they click on a menu that doesn't have any sub-menu, it will redirect them fine.<br> <br> I think I read somewhere, that if we do the downlevel correctly, if they click on a menu item, than it will make the sub-menu pop-up and they can select the sub-link. Am I wrong?<br> <br> <br> 2005-11-30T21:15:13-05:001129349http://forums.asp.net/p/941229/1129349.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu Yes, that is the exact symptoms of the issue I was describing in my blog post.&nbsp; The recommendations I made will help you work around this issue.<br> --<br> Danny 2005-12-01T17:42:36-05:001160702http://forums.asp.net/p/941229/1160702.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Hi Danny,</p> <p>I tried to do what your blog said. but still I am getting the down-level menu. can you give us a short example which would work on safari?</p> <p>thank you.</p> <p>ravi</p> <p>&nbsp;</p> 2006-01-06T03:18:01-05:001160779http://forums.asp.net/p/941229/1160779.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Hi there</p> <p>I disagree with Danny's work around - there is a much simpler way to get this working.</p> <p>The asp.net menu control is actually cross browser complaint, and does work correctly on Safari. The problem is how asp.net identify's the browser, and determines the javascript and rendering requirements for it.</p> <p>Asp.net identify's the browser by comparing it's caps to entries found in the machine.config and web.config. As browsers get updated, these string identifiers change, and so asp.net misreports what browser it is, causing it to render incorrectly on most browsers. Microsoft have outsourced the updating of browser caps to another company - and that company is not doing anywhere near a decent job at keeping theses up to date.</p> <p>Good news is that you can set this up yourself by adding entries to the web config. There are plenty of listings available on the net, and I suggest searching Google for &quot;Browser Caps ASP.NET web.config Safari&quot;.</p> <p>Hope this helps</p> <p>Doug</p> 2006-01-06T06:35:00-05:001161295http://forums.asp.net/p/941229/1161295.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Sorry for not being clearer.&nbsp; Safari and IE5.0 are considered downlevel browsers by ASP.NET.&nbsp; By default you won't get rich renderings for either of those.&nbsp; Part of the reason is that&nbsp;for much of the development of ASP.NET, Safari did not support all the features necessary to&nbsp;render&nbsp;the uplevel menu.&nbsp; What I am&nbsp;trying to help&nbsp;out with&nbsp;in my blog is the issue where you click on a link in the downlevel menu and the menu seems to&nbsp;disappear.&nbsp; </p> <p>However, all that said, what Doug&nbsp;has&nbsp;mentioned&nbsp;is correct, you can modify browser caps to push try and push a richly rendered menu to Safari.&nbsp; But, be warned, while this <strong><em>may</em></strong> work for you, it is <strong>not</strong> a supported scenario and there are a couple of known issues with doing this.&nbsp;&nbsp;Not supported&nbsp;means that any issues you encounter after this modification is up to you to investigate and find workarounds for.&nbsp; I'm certainly not saying it's a bad idea, if it works for you, that is great and I'd love to know about it.</p> <p>Future versions of ASP.NET and the Menu control will evaluate what features have become availible in Safari and render appropriately.&nbsp; <br> --<br> Danny</p> 2006-01-06T17:39:06-05:001162440http://forums.asp.net/p/941229/1162440.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Hi Doug,</p> <p>I tried editing the browsercaps and it does not seem to do the trick for me. Have you got is working on safari. Can you post your code please?</p> <p>ravi</p> <p>&nbsp;</p> 2006-01-08T20:54:48-05:001170083http://forums.asp.net/p/941229/1170083.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Hello Doug,</p> <p>&nbsp;</p> <p>I also gave the browsercaps a try but Safari still renders the downlevel menu :(<br> Would be great if you could post what you have done to make Safari render the menu like IE6 does.<br> <br> I have used the following browsercaps:<br> <a href="http://www.codeproject.com/aspnet/browsercaps.asp">http://www.codeproject.com/aspnet/browsercaps.asp</a><br> <br> and added<font color="#0000ff" size="2"></p> <p>&lt;</font><font color="#800000" size="2">case</font><font color="#0000ff" size="2"> </font><font color="#ff0000" size="2">match</font><font color="#0000ff" size="2">=</font><font size="2">&quot;</font><font color="#0000ff" size="2">AppleWebKit/412.9</font><font size="2">&quot;</font><font color="#0000ff" size="2">&gt;<br> </font><font size="2">&nbsp; version=&quot;2.0.3&quot;<br> &nbsp; majorversion=&quot;2&quot;<br> &nbsp; minorversion=&quot;.0&quot;<br> </font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">case</font><font color="#0000ff" size="2">&gt;</p> <p></font><br> I have also tried<br> <a href="http://slingfive.com/pages/code/browserCaps/">http://slingfive.com/pages/code/browserCaps/</a> <br> </p> <p>Dieter</p> 2006-01-16T20:42:53-05:001170389http://forums.asp.net/p/941229/1170389.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Hi Guys</p> <p>This is what i use for safari:</p> <p>&lt;case match=&quot;AppleWebKit/(?'version'(?'major'\d?)(?'minor'\d{2})(?'letters'\w*)?)&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; browser=AppleWebKit<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; version=&#36;{version}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; majorversion=0&#36;{major}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; minorversion=0.&#36;{minor}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; frames=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tables=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cookies=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; javascript=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; javaapplets=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ecmascriptversion=1.5<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w3cdomversion=1.0<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; css1=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; css2=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xml=true<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tagwriter=System.Web.UI.HtmlTextWriter<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;case match=&quot;AppleWebKit/(?'version'(?'major'\d)(?'minor'\d&#43;)(?'letters'\w*))(.* )?(?'type'[^/\d]*)/.*( |&#36;)&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type=&#36;{type}<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/case&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/case&gt;</p> <p>Cheers</p> 2006-01-17T06:27:41-05:001173769http://forums.asp.net/p/941229/1173769.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>Hello Doug,</p> <p>thanks for your reply.</p> <p>Even with the browercaps you have provided, Safari still renders the downlevel menufor me.<br> Does it really render the uplevel menu in Safari for you?<br> <br> Best regards,</p> <p>Dieter</p> 2006-01-19T21:16:27-05:001218049http://forums.asp.net/p/941229/1218049.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>I have modified my web.config to have the browsercaps info for safari in there, but, while, a test page does give me the expected information for Safari, Safari still does not render the the dynamic submenu items any differently (there is no submenu shown on hover or click and the on click the menu disappears entirely).</p> <p><font color="#0000ff" size="2"></font><font color="#0000ff" size="2"><font color="#000000" size="3">Has anyone heard anything new on this topic?&nbsp; </font></p> </font> 2006-03-06T12:51:55-05:001232712http://forums.asp.net/p/941229/1232712.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu I cant get it to work either. <br> <br> But I stopped the menu form disappearing. I noticed if I changed the Value=&quot;New Items&quot; of the menu item the menu disappeared, if i left it at &quot;New Items&quot; it didn't.<br> <br> Big deal though the sub menus still do not work. 2006-03-21T13:25:17-05:001236101http://forums.asp.net/p/941229/1236101.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>If you put ClientTarget=&quot;uplevel&quot; in the page directive &lt;%@ Page ClientTarget=&quot;uplevel&quot; ......%&gt; Safari works totally!!!!!</p> <p>&nbsp;</p> 2006-03-23T22:48:44-05:001236136http://forums.asp.net/p/941229/1236136.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>You could also put it in the preint event...</p> <p>&nbsp; Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If InStr(Request.ServerVariables(&quot;http_user_agent&quot;), &quot;Safari&quot;) Then<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Page.ClientTarget = &quot;uplevel&quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br> &nbsp;&nbsp;&nbsp; End Sub</p> 2006-03-23T23:45:41-05:001249518http://forums.asp.net/p/941229/1249518.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu thanks&nbsp;craigbtx. You solved a long time problem 2006-04-06T07:20:05-04:001357975http://forums.asp.net/p/941229/1357975.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>I followed this thread - incredibly helpful...but with the uplevel browser I only get the first item in the submenu's - I can still hover over the &quot;invisible&quot; items, select them and navigate from them...</p> <p>Anybody else seeing this symptom??</p> <p>Also, is the browsecaps entry still needed with the ClientTarget Page directive?</p> 2006-08-01T22:08:18-04:001358509http://forums.asp.net/p/941229/1358509.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>I have not experienced getting only the first item.</p> <p>I dont use browsercaps at all.</p> <p>Everything works fine!!!</p> 2006-08-02T12:20:25-04:001358837http://forums.asp.net/p/941229/1358837.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu <p>OK - figured this one out...</p> <p>If you use the DynamicMenuStyle in addition to DynamicMenuHoverStyle and DynamicMenuItemStyle the secondary menu is clipped. Remove the DynamicMenuStyle tag and everything works perfectly.</p> 2006-08-02T16:18:46-04:001491335http://forums.asp.net/p/941229/1491335.aspx/1?Re+Safari+browser+and+asp+menuRe: Safari browser and asp:menu Thanks!&nbsp; using the Page.ClientTarget = &quot;uplevel&quot; method worked perfectly.&nbsp; I tried to edit the Mozilla.browser file by removing the asp:Menu control adaptor section&nbsp;for Safari browsers, but my changes had no effect even after I restarted IIS web services on the server.&nbsp; Is there something else I need to do to get .browser file changes to take effect or is there some other mechanism in play that forces the down browser rendering of the asp:Menu control on Safari? 2006-12-08T19:17:00-05:00