Safari browser and asp:menu

Rate It (1)

Last post 05-03-2009 9:03 AM by tcblues. 54 replies.

Sort Posts:

  • Safari browser and asp:menu

    11-28-2005, 4:02 PM
    • Member
      15 point Member
    • gozoliet
    • Member since 11-28-2005, 9:01 PM
    • Posts 5
    Hey folks,
    Having trouble getting the asp:menu to work right on OS X using Safari.
    The mouseovers simply do not work, and when you click on one of the links, the menu disappears completely.
    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)

    Any ideas?
    -Kevin

  • Re: Safari browser and asp:menu

    11-29-2005, 4:50 PM
    • Contributor
      4,347 point Contributor
    • dannychen
    • Member since 08-24-2004, 12:17 PM
    • Redmond, WA
    • Posts 840
    • AspNetTeam
      Moderator
    Kevin,
      This is a known issue.  First off, Safari gets served the menu adaptor which is fully functional but does not support the dynamic fly-outs.  Instead you must click on menu items to see the sub menus.  Secondly, there are some style issues with Safari and Menu.  I've posted on my blog about these issues and potential workarounds: 

    http://weblogs.asp.net/dannychen/archive/2005/11/21/431121.aspx

    --
    Danny
    disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
  • Re: Safari browser and asp:menu

    11-30-2005, 5:15 PM
    • Member
      15 point Member
    • gozoliet
    • Member since 11-28-2005, 9:01 PM
    • Posts 5
    Hey Danny,

    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!).  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.

    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?


  • Re: Safari browser and asp:menu

    12-01-2005, 1:42 PM
    • Contributor
      4,347 point Contributor
    • dannychen
    • Member since 08-24-2004, 12:17 PM
    • Redmond, WA
    • Posts 840
    • AspNetTeam
      Moderator
    Yes, that is the exact symptoms of the issue I was describing in my blog post.  The recommendations I made will help you work around this issue.
    --
    Danny
    disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
  • Re: Safari browser and asp:menu

    01-05-2006, 11:18 PM
    • Member
      32 point Member
    • sravi
    • Member since 01-06-2006, 4:11 AM
    • Posts 7

    Hi Danny,

    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?

    thank you.

    ravi

     

  • Re: Safari browser and asp:menu

    01-06-2006, 2:35 AM
    • Member
      260 point Member
    • ResinMC
    • Member since 11-28-2005, 3:28 PM
    • Posts 52

    Hi there

    I disagree with Danny's work around - there is a much simpler way to get this working.

    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.

    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.

    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 "Browser Caps ASP.NET web.config Safari".

    Hope this helps

    Doug

  • Re: Safari browser and asp:menu

    01-06-2006, 1:39 PM
    • Contributor
      4,347 point Contributor
    • dannychen
    • Member since 08-24-2004, 12:17 PM
    • Redmond, WA
    • Posts 840
    • AspNetTeam
      Moderator

    Sorry for not being clearer.  Safari and IE5.0 are considered downlevel browsers by ASP.NET.  By default you won't get rich renderings for either of those.  Part of the reason is that for much of the development of ASP.NET, Safari did not support all the features necessary to render the uplevel menu.  What I am trying to help out with in my blog is the issue where you click on a link in the downlevel menu and the menu seems to disappear. 

    However, all that said, what Doug has mentioned is correct, you can modify browser caps to push try and push a richly rendered menu to Safari.  But, be warned, while this may work for you, it is not a supported scenario and there are a couple of known issues with doing this.  Not supported means that any issues you encounter after this modification is up to you to investigate and find workarounds for.  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.

    Future versions of ASP.NET and the Menu control will evaluate what features have become availible in Safari and render appropriately. 
    --
    Danny

    disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
  • Re: Safari browser and asp:menu

    01-08-2006, 4:54 PM
    • Member
      32 point Member
    • sravi
    • Member since 01-06-2006, 4:11 AM
    • Posts 7

    Hi Doug,

    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?

    ravi

     

  • Re: Safari browser and asp:menu

    01-16-2006, 4:42 PM
    • Member
      45 point Member
    • dpomt
    • Member since 01-16-2006, 9:37 PM
    • Posts 9

    Hello Doug,

     

    I also gave the browsercaps a try but Safari still renders the downlevel menu :(
    Would be great if you could post what you have done to make Safari render the menu like IE6 does.

    I have used the following browsercaps:
    http://www.codeproject.com/aspnet/browsercaps.asp

    and added

    <case match="AppleWebKit/412.9">
      version="2.0.3"
      majorversion="2"
      minorversion=".0"
    </case>


    I have also tried
    http://slingfive.com/pages/code/browserCaps/

    Dieter

  • Re: Safari browser and asp:menu

    01-17-2006, 2:27 AM
    • Member
      260 point Member
    • ResinMC
    • Member since 11-28-2005, 3:28 PM
    • Posts 52

    Hi Guys

    This is what i use for safari:

    <case match="AppleWebKit/(?'version'(?'major'\d?)(?'minor'\d{2})(?'letters'\w*)?)">
                    browser=AppleWebKit
                    version=${version}
                    majorversion=0${major}
                    minorversion=0.${minor}
                    frames=true
                    tables=true
                    cookies=true
                    javascript=true
                    javaapplets=true
                    ecmascriptversion=1.5
                    w3cdomversion=1.0
                    css1=true
                    css2=true
                    xml=true
                    tagwriter=System.Web.UI.HtmlTextWriter
                    <case match="AppleWebKit/(?'version'(?'major'\d)(?'minor'\d+)(?'letters'\w*))(.* )?(?'type'[^/\d]*)/.*( |$)">
                        type=${type}
                    </case>
                </case>

    Cheers

  • Re: Safari browser and asp:menu

    01-19-2006, 5:16 PM
    • Member
      45 point Member
    • dpomt
    • Member since 01-16-2006, 9:37 PM
    • Posts 9

    Hello Doug,

    thanks for your reply.

    Even with the browercaps you have provided, Safari still renders the downlevel menufor me.
    Does it really render the uplevel menu in Safari for you?

    Best regards,

    Dieter

  • Re: Safari browser and asp:menu

    03-06-2006, 8:51 AM
    • Member
      5 point Member
    • dirkguard
    • Member since 03-06-2006, 1:18 PM
    • Posts 1

    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).

    Has anyone heard anything new on this topic? 

  • Re: Safari browser and asp:menu

    03-21-2006, 9:25 AM
    • Participant
      1,567 point Participant
    • craigbtx
    • Member since 10-01-2004, 4:50 PM
    • Posts 664
    I cant get it to work either.

    But I stopped the menu form disappearing. I noticed if I changed the Value="New Items" of the menu item the menu disappeared, if i left it at "New Items" it didn't.

    Big deal though the sub menus still do not work.
  • Re: Safari browser and asp:menu

    03-23-2006, 6:48 PM
    • Participant
      1,567 point Participant
    • craigbtx
    • Member since 10-01-2004, 4:50 PM
    • Posts 664

    If you put ClientTarget="uplevel" in the page directive <%@ Page ClientTarget="uplevel" ......%> Safari works totally!!!!!

     

  • Re: Safari browser and asp:menu

    03-23-2006, 7:45 PM
    • Participant
      1,567 point Participant
    • craigbtx
    • Member since 10-01-2004, 4:50 PM
    • Posts 664

    You could also put it in the preint event...

      Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
            If InStr(Request.ServerVariables("http_user_agent"), "Safari") Then
                Page.ClientTarget = "uplevel"
            End If
        End Sub

Page 1 of 4 (55 items) 1 2 3 4 Next >