SharePoint 2013 Workspace Scroll Issue Fix

function FixWorkspace() {
        // if you are using a header that is affixed to the top (i.e. SharePoint Ribbon) put the ID or class here to change the workspace height accordingly.
        var header = '#myHeader';
	var width = $(window).width();
        var height;
        if ($(header).length) {
        	height = $(window).height() - $(header).height();
        } else {
                height = $(window).height();
        }
	$('#s4-workspace').width(width).height(height);
}

$(document).ready(function() {
        FixWorkspace();
});

$(window).resize(function() {
        FixWorkspace();
});

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.