Themes: Fix themes search event not firing on enter.
Attach the submit event to the parent search form in the installed and add new theme screen. Following [58405], the submit event was no longer attached to an object that was able to handle form submissions. Props nithi22, nithins53, josklever, the-ank, debarghyabanerjee, sabernhardt, jeherve, hellofromtonya. Fixes #61578. Built from https://develop.svn.wordpress.org/trunk@58914 git-svn-id: http://core.svn.wordpress.org/trunk@58310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4b49b0d168
commit
ce2b9f1fb2
|
@ -96,7 +96,7 @@ themes.view.Appearance = wp.Backbone.View.extend({
|
|||
},
|
||||
|
||||
// Defines search element container.
|
||||
searchContainer: $( '.search-form .search-box' ),
|
||||
searchContainer: $( '.search-form' ),
|
||||
|
||||
// Search input and view
|
||||
// for current theme collection.
|
||||
|
@ -118,11 +118,13 @@ themes.view.Appearance = wp.Backbone.View.extend({
|
|||
// Render and append after screen title.
|
||||
view.render();
|
||||
this.searchContainer
|
||||
.find( '.search-box' )
|
||||
.append( $.parseHTML( '<label for="wp-filter-search-input">' + l10n.search + '</label>' ) )
|
||||
.append( view.el )
|
||||
.on( 'submit', function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
.append( view.el );
|
||||
|
||||
this.searchContainer.on( 'submit', function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
},
|
||||
|
||||
// Checks when the user gets close to the bottom
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58913';
|
||||
$wp_version = '6.7-alpha-58914';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue