[wp-trac] [WordPress Trac] #42343: Customize: Themes search debounce is not debounced properly

WordPress Trac noreply at wordpress.org
Sat Oct 28 03:22:54 UTC 2017


#42343: Customize: Themes search debounce is not debounced properly
------------------------------+------------------------------
 Reporter:  afercia           |       Owner:  adamsilverstein
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  4.9
Component:  Customize         |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:  ui, javascript
------------------------------+------------------------------
Changes (by celloexpressions):

 * keywords:  needs-patch => has-patch commit


Comment:

 It seems that the second call to `checkTerm()` was extraneous; I'm not
 sure why that was ever added. Additionally, we can trim spaces from the
 input when checking if the term changed to avoid unnecessary reloading.
 [attachment:42343.diff] should fix this with relatively minimal changes.

 As an aside, `checkTerm()` should probably be renamed before release.
 `maybeInitializeRemoteQuery()` or something along those lines would be
 more appropriate given that it is now only used for searching on remote
 section instances (it formerly also handled tags and other checks).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42343#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list