public
Last active

Fix an issue where occasionally the JavaScript that runs a SharePoint 2010 page's dynamic elements (ribbon, scrolling, etc) fails to initialise in Webkit browsers.

  • Download Gist
SP2010-chromeScrollingFix
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//via http://withinsharepoint.com/archives/256
 
if (jQuery.browser.webkit) {
jQuery(document).ready(function () {
var interval;
function loopCheck() {
if (typeof (_spBodyOnLoadWrapper) !== "undefined" && _spBodyOnLoadCalled == false)
_spBodyOnLoadWrapper();
else
window.clearInterval(interval);
}
// Give SP a chance..
setTimeout(function () { interval = window.setInterval(loopCheck, 30); }, 120);
});
}

excellent solution, thanks both to you and Maarten for the clean fix!

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.