Index: wp-content/themes/twentyfourteen/functions.php
===================================================================
--- wp-content/themes/twentyfourteen/functions.php	(revision 28757)
+++ wp-content/themes/twentyfourteen/functions.php	(working copy)
@@ -256,7 +256,7 @@
 		) );
 	}
 
-	wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140319', true );
+	wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20140616', true );
 }
 add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
 
Index: wp-content/themes/twentyfourteen/js/functions.js
===================================================================
--- wp-content/themes/twentyfourteen/js/functions.js	(revision 28757)
+++ wp-content/themes/twentyfourteen/js/functions.js	(working copy)
@@ -94,7 +94,7 @@
 				mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
 
 				_window.on( 'scroll.twentyfourteen', function() {
-					if ( ( window.scrollY > mastheadOffset ) && ( mastheadHeight < 49 ) ) {
+					if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) {
 						body.addClass( 'masthead-fixed' );
 					} else {
 						body.removeClass( 'masthead-fixed' );
