Index: src/wp-content/themes/twentyfifteen/js/functions.js
===================================================================
--- src/wp-content/themes/twentyfifteen/js/functions.js	(revision 29916)
+++ src/wp-content/themes/twentyfifteen/js/functions.js	(working copy)
@@ -6,6 +6,8 @@
  */
 
 ( function( $ ) {
+	'use strict';
+
 	$( 'html' ).removeClass( 'no-js' );
 
 	// Add dropdown toggle that display child menu items.
@@ -47,4 +49,79 @@
 			$( this ).toggleClass( 'toggled-on' );
 		} );
 	} )();
-} )( jQuery );
\ No newline at end of file
+
+	// Sidebar scrolling.
+
+	$( function() {
+		var	$window = $( window ),
+			lastWindowPos = 0,
+			$document = $( document ),
+			$adminbar = $( '#wpadminbar' ),
+			$sidebar = $( '#sidebar' ),
+			top = false,
+			bottom = false,
+			windowWidth, windowHeight, documentHeight,
+			adminBarHeight, sidebarWidth, sidebarHeight,
+			resizeTimer;
+
+		function resize() {
+			windowWidth = $window.width();
+			windowHeight = $window.height();
+			documentHeight = $document.height();
+			adminBarHeight = $adminbar.height();
+			sidebarWidth = $sidebar.width();
+			sidebarHeight = $sidebar.height();
+		}
+
+		function scroll() {
+			var windowPos = $window.scrollTop();
+
+			if ( sidebarWidth < windowWidth && sidebarHeight < documentHeight ) {
+				if ( windowPos > lastWindowPos ) {
+					if ( top ) {
+						top = false;
+						$sidebar.attr( 'style', 'top: ' + $sidebar.offset().top + 'px;' );
+					} else if ( ! bottom && windowPos + windowHeight > sidebarHeight + $sidebar.offset().top ) {
+						bottom = true;
+						$sidebar.attr( 'style', 'position: fixed;bottom: 0;' );
+					}
+				} else if ( windowPos < lastWindowPos ) {
+					if ( bottom ) {
+						bottom = false;
+						$sidebar.attr( 'style', 'top: ' + $sidebar.offset().top + 'px;' );
+					} else if ( ! top && windowPos + adminBarHeight < $sidebar.offset().top ) {
+						top = true;
+						$sidebar.attr( 'style', 'position: fixed;' );
+					}
+				} else {
+					top = bottom = false;
+					$sidebar.attr( 'style', 'top: ' + $sidebar.offset().top + 'px;' );
+				}
+			} else {
+				top = bottom = false;
+				$sidebar.removeAttr( 'style' );
+			}
+
+			lastWindowPos = windowPos;
+		}
+
+		function resizeAndScroll() {
+			resize();
+			scroll();
+		}
+
+		$window.on( 'scroll.pin-sidebar', scroll );
+
+		$window.resize( function() {
+			clearTimeout( resizeTimer );
+
+			resizeTimer = setTimeout( resizeAndScroll, 200 );
+		} );
+
+		resizeAndScroll();
+
+		for ( var i = 1; i < 6; i++ ) {
+			setTimeout( resizeAndScroll, 500 * i );
+		}
+	} );
+} )( jQuery );
Index: src/wp-content/themes/twentyfifteen/style.css
===================================================================
--- src/wp-content/themes/twentyfifteen/style.css	(revision 29916)
+++ src/wp-content/themes/twentyfifteen/style.css	(working copy)
@@ -3804,20 +3804,12 @@
 
 	.sidebar {
 		float: left;
-		height: 100%;
-		overflow-y: auto;
 		margin-right: -100%;
 		max-width: 413px;
-		-webkit-overflow-scrolling: touch;
-		position: fixed;
+		position: absolute;
 		width: 29.4118%;
 	}
 
-	.admin-bar .sidebar {
-		height: -webkit-calc(100% - 32px);
-		height: calc(100% - 32px);
-	}
-
 	.secondary {
 		background-color: transparent;
 		display: block;
