View an updated cause and fix here that fixes more than just scrolling
http://withinsharepoint.com/archives/256
Yes, this is one of ‘those’ posts, about how to fix/workaround the issue of SharePoint having the Body set to scroll=”no” causing issues with scrolling. As a recap for those unfamiliar with this design decision from Microsoft it causes a few side effects. This is all to support the ribbon by the way and every method I’ve seen to workaround it in the past has had bad effects on the ribbon.
- Chrome OSX and Safari OSX have significant issues with scrolling on SharePoint 2010 Pages
- Scroll=”no” is for fixing the ribbon and all sub-elements to the page in the right location. This includes buttons, mouse over information and menus. Not something to be trifled with.
- By default you do not ever have a scrollbar when loading a 2010 page until the javascript loads for figuring out all the ribbon positioning and height.
var _fV4UI = true; -This line is what loads the default ribbon and scrolling behavior in sharepoint.
$(document).ready(function()
{
if($.browser.webkit || $.browser.safari)
{
//handle scrolling on less supported browsers like chrome ![]()
$(‘BODY’).css(“overflow”,”auto”);
var h = $(‘#s4-workspace’).height();
$(‘#s4-workspace’).css(“height”, “auto”).css(“overflow-y”, “auto”).css(“min-height”, h);
}
else
{
//handle normal ribbon rendering and behavior on fully supported browsers
var _fV4UI = true;
}
});
#1 by Palanivel on September 13, 2012 - 6:05 am
Excellent article.