Issue with SharePoint 2010 and Google Chrome where the scrolling and ribbon do not work sometimes.
My master page has the following
<body scroll="no" onload="if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();" class="v4master">
Since I am using jQuery anyway, I pulled the code from the body onload and instead used a jQuery document ready method to call this:
<script type="text/javascript"> $(document).ready(function(){ if (typeof(_spBodyOnLoadWrapper) != 'undefined') { _spBodyOnLoadWrapper(); } }); </script>
(or)
just simply past on bottom of the Master page
<script type="text/javascript">
_spBodyOnLoadWrapper();
</script>
Anyway - this seems to have solved my issue. Please try and let me know if this works for you as well.
Thank you. This is a nice, elegant solution to the problem.
ReplyDeleteIn my case my CSSFriendly driven megamenu would fail on the second load of the page in Chrome. Was driving me nuts...
I did find another solution that effectively does the same thing, just more targetted to Chrome and set to trigger only when it fails.
http://mosswell.blogspot.com.au/2013/06/sharepoint-2010-and-chrome-javascript.html
But I think I like yours better - covers everything all the time.