diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 11f13a1acf..159692080a 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' ), '20131205', true ); + wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131209', 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 038545cfe3..add41087b2 100644 --- a/src/wp-content/themes/twentyfourteen/js/functions.js +++ b/src/wp-content/themes/twentyfourteen/js/functions.js @@ -63,7 +63,7 @@ that.toggleClass( 'active' ); wrapper.toggleClass( 'hide' ); - if ( that.is( '.active' ) || $( '.screen-reader-text' ) === event.target ) { + if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) { wrapper.find( '.search-field' ).focus(); } } ); diff --git a/src/wp-content/themes/twentyfourteen/rtl.css b/src/wp-content/themes/twentyfourteen/rtl.css index 213a71406d..80e16d0d5e 100644 --- a/src/wp-content/themes/twentyfourteen/rtl.css +++ b/src/wp-content/themes/twentyfourteen/rtl.css @@ -98,8 +98,8 @@ td { } .search-toggle .screen-reader-text { - right: auto; - left: 0; + right: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */ + left: auto; } diff --git a/src/wp-content/themes/twentyfourteen/style.css b/src/wp-content/themes/twentyfourteen/style.css index e7131baac2..01005c4ddc 100644 --- a/src/wp-content/themes/twentyfourteen/style.css +++ b/src/wp-content/themes/twentyfourteen/style.css @@ -878,6 +878,10 @@ span + .edit-link:before, margin-top: 14px; } +.search-toggle .screen-reader-text { + left: 5px; /* Avoid a horizontal scrollbar when the site has a long menu */ +} + .search-box-wrapper { -webkit-box-sizing: border-box; -moz-box-sizing: border-box;