Committing before attempting scrolling with sticky header and footer