mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Themes: For searches, replace the document hash, don't add a new history event for each keypress. See #25948
Built from https://develop.svn.wordpress.org/trunk@26515 git-svn-id: http://core.svn.wordpress.org/trunk@26408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
527efd828c
commit
f1f6cec5e8
@ -591,10 +591,11 @@ themes.view.Search = wp.Backbone.View.extend({
|
||||
this.collection.doSearch( event.target.value );
|
||||
|
||||
// Update the URL hash
|
||||
if ( event.target.value )
|
||||
themes.router.navigate( 'search/' + event.target.value );
|
||||
else
|
||||
if ( event.target.value ) {
|
||||
themes.router.navigate( 'search/' + event.target.value, { replace: true } );
|
||||
} else {
|
||||
themes.router.navigate( '' );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
2
wp-admin/js/theme.min.js
vendored
2
wp-admin/js/theme.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user