mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Themes: For searches, replace the document hash, don't add a new history event for each keypress. See #25948
git-svn-id: https://develop.svn.wordpress.org/trunk@26515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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( '' );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user