Themes: Bail if the search term matches the currently rendered themes, Fixes the events being clobbered. Props jblz. Fixes #26347
Built from https://develop.svn.wordpress.org/trunk@26521 git-svn-id: http://core.svn.wordpress.org/trunk@26414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c9356b360
commit
c054cdad32
|
@ -97,6 +97,12 @@ themes.Collection = Backbone.Collection.extend({
|
||||||
// and triggers an update event
|
// and triggers an update event
|
||||||
doSearch: function( value ) {
|
doSearch: function( value ) {
|
||||||
|
|
||||||
|
// Don't do anything if we've already done this search
|
||||||
|
// Useful because the Search handler fires multiple times per keystroke
|
||||||
|
if ( this.terms === value ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Updates terms with the value passed
|
// Updates terms with the value passed
|
||||||
this.terms = value;
|
this.terms = value;
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue