Wednesday, March 7, 2012

No SharePoint 2007 Menu Flyouts/DropDowns in Chrome

Broken Navigation Menus

As of Chrome 15 (we think) SharePoint 2007 sites started to behave a little funky. The stock SharePoint menu started to behave erratically, intermittently not showing navigation flyouts. To be clear, on every other page load the navigation would behave appropriately, but the other half of the time the menu wouldn’t do anything on hover, making it impossible to see sub navigation items under a given header.
This seems to affect all SP 2007 sites for Chrome version 15 and later. The error strangely enough seems to be more related to javascript than rendering behavior.

The Fix

I’ll save you the troubleshoot, we added a late loading script that tells the menu that flyouts are indeed kosher. For some reason this variable gets set incorrectly for newer versions of Chrome. There’s a good chance MS may not release a fix for this since Chrome isn’t a supported browser for SharePoint 2007.
<script type="text/javascript">
    //Updates the stock SharePoint menu settings to allow flyouts,
    //seems to get intermittently improperly set on Chrome >= 15.
    flyoutsAllowed = true;
That’s it, pretty simple (especially if you already have some jQuery running around). Otherwise you can get by having the script run really late in the document life cycle.

Hope that Helps Someone,