Menus: after [36379] prevent "Quick Search" form submission when pressing Enter.
Fixes #35374. Built from https://develop.svn.wordpress.org/trunk@36426 git-svn-id: http://core.svn.wordpress.org/trunk@36393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2573fa7ab8
commit
82f59fc6ef
|
@ -854,8 +854,13 @@ var wpNavMenu;
|
|||
var searchTimer,
|
||||
inputEvent;
|
||||
|
||||
// Prevent form submission.
|
||||
$( '#nav-menu-meta' ).on( 'submit', function( event ) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/*
|
||||
* Use feature detection to determine whether password inputs should use
|
||||
* Use feature detection to determine whether inputs should use
|
||||
* the `keyup` or `input` event. Input is preferred but lacks support
|
||||
* in legacy browsers. See changeset 34078, see also ticket #26600#comment:59
|
||||
*/
|
||||
|
@ -865,14 +870,9 @@ var wpNavMenu;
|
|||
inputEvent = 'keyup';
|
||||
}
|
||||
|
||||
$( '.quick-search' ).on( inputEvent, function( e ) {
|
||||
$( '.quick-search' ).on( inputEvent, function() {
|
||||
var t = $(this);
|
||||
|
||||
if( 13 == e.which ) {
|
||||
api.updateQuickSearchResults( t );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( searchTimer ) clearTimeout(searchTimer);
|
||||
|
||||
searchTimer = setTimeout(function(){
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36425';
|
||||
$wp_version = '4.5-alpha-36426';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue