Customizer: Better experience for widget filtering in desktop and iOS Safari.

Previously, the search field did not appear at all in desktop Safari, and the auto-focus keyboard fly-up in iOS rendered widget adding frustrating at best.

props dsmart, ocean90.
fixes #31987.

Built from https://develop.svn.wordpress.org/trunk@32243


git-svn-id: http://core.svn.wordpress.org/trunk@32214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2015-04-21 14:15:26 +00:00
parent d672824273
commit f861754016
8 changed files with 29 additions and 7 deletions

View File

@ -342,7 +342,7 @@ body.adding-widget .add-new-widget:before {
#available-widgets {
position: absolute;
overflow: auto;
top: 46px;
top: 0;
bottom: 0;
right: -301px;
width: 300px;
@ -354,6 +354,14 @@ body.adding-widget .add-new-widget:before {
border-left: 1px solid #dddddd;
}
#available-widgets-list {
top: 46px;
position: absolute;
overflow: auto;
bottom: 0;
width: 100%;
}
#available-widgets-filter {
position: fixed;
top: 0;
@ -614,6 +622,7 @@ body.adding-widget #customize-preview {
@media screen and ( max-width: 640px ) {
body.adding-widget div#available-widgets {
top: 46px;
right: 0;
z-index: 10;
width: 100%;

File diff suppressed because one or more lines are too long

View File

@ -342,7 +342,7 @@ body.adding-widget .add-new-widget:before {
#available-widgets {
position: absolute;
overflow: auto;
top: 46px;
top: 0;
bottom: 0;
left: -301px;
width: 300px;
@ -354,6 +354,14 @@ body.adding-widget .add-new-widget:before {
border-right: 1px solid #dddddd;
}
#available-widgets-list {
top: 46px;
position: absolute;
overflow: auto;
bottom: 0;
width: 100%;
}
#available-widgets-filter {
position: fixed;
top: 0;
@ -614,6 +622,7 @@ body.adding-widget #customize-preview {
@media screen and ( max-width: 640px ) {
body.adding-widget div#available-widgets {
top: 46px;
left: 0;
z-index: 10;
width: 100%;

File diff suppressed because one or more lines are too long

View File

@ -294,7 +294,9 @@
// Reset search
this.collection.doSearch( '' );
this.$search.focus();
if ( ! api.settings.browser.mobile ) {
this.$search.focus();
}
},
// Closes the panel

File diff suppressed because one or more lines are too long

View File

@ -668,11 +668,13 @@ final class WP_Customize_Widgets {
<label class="screen-reader-text" for="widgets-search"><?php _e( 'Search Widgets' ); ?></label>
<input type="search" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ) ?>" />
</div>
<div id="available-widgets-list">
<?php foreach ( $this->get_available_widgets() as $available_widget ): ?>
<div id="widget-tpl-<?php echo esc_attr( $available_widget['id'] ) ?>" data-widget-id="<?php echo esc_attr( $available_widget['id'] ) ?>" class="widget-tpl <?php echo esc_attr( $available_widget['id'] ) ?>" tabindex="0">
<?php echo $available_widget['control_tpl']; ?>
</div>
<?php endforeach; ?>
</div><!-- #available-widgets-list -->
</div><!-- #available-widgets -->
</div><!-- #widgets-left -->
<?php

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-RC2-32242';
$wp_version = '4.2-RC2-32243';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.