diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index e611a213ae..11f13a1acf 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -262,7 +262,7 @@ function twentyfourteen_scripts() { ) ); } - wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131203', true ); + wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131205', true ); } add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); diff --git a/src/wp-content/themes/twentyfourteen/js/functions.js b/src/wp-content/themes/twentyfourteen/js/functions.js index 8299945ef4..038545cfe3 100644 --- a/src/wp-content/themes/twentyfourteen/js/functions.js +++ b/src/wp-content/themes/twentyfourteen/js/functions.js @@ -56,14 +56,14 @@ $( function() { // Search toggle. - $( '.search-toggle' ).on( 'click.twentyfourteen', function() { + $( '.search-toggle' ).on( 'click.twentyfourteen', function( event ) { var that = $( this ), wrapper = $( '.search-box-wrapper' ); that.toggleClass( 'active' ); wrapper.toggleClass( 'hide' ); - if ( that.is( '.active' ) ) { + if ( that.is( '.active' ) || $( '.screen-reader-text' ) === event.target ) { wrapper.find( '.search-field' ).focus(); } } ); diff --git a/src/wp-content/themes/twentyfourteen/style.css b/src/wp-content/themes/twentyfourteen/style.css index 7d2b47f7e2..3af426cce9 100644 --- a/src/wp-content/themes/twentyfourteen/style.css +++ b/src/wp-content/themes/twentyfourteen/style.css @@ -903,10 +903,6 @@ span + .edit-link:before, width: 100%; } -.search-toggle .screen-reader-text { - right: 0; /* This makes sure a horizontal scrollbar won't appear */ -} - /** * 5.0 Navigation