Last active
January 13, 2017 18:54
-
-
Save alirobe/4224245 to your computer and use it in GitHub Desktop.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//via http://withinsharepoint.com/archives/256 or http://withinsharepoint.com/archives/210 | |
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); | |
}); | |
} |
Great solution!
Did not work for me.
Should it be in the <head>
section of the HTML that makes the Master in SP2013?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
excellent solution, thanks both to you and Maarten for the clean fix!