[wp-trac] [WordPress Trac] #34886: Search Form should not submit empty strings
WordPress Trac
noreply at wordpress.org
Sun Dec 6 21:58:04 UTC 2015
#34886: Search Form should not submit empty strings
-------------------------+------------------------------
Reporter: gibrown | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by westonruter):
@gibrown good question on the separate JS file. Given HTTP/2 and “server
push”, there will (eventually) be zero performance hit to enqueue
additional scripts. Moreover, there are other small scripts that get
enqueued with a typical request, e.g. on Twenty Fifteen:
* `twentyfifteen/js/skip-link-focus-fix.js`
* `twentyfifteen/js/functions.js`
* `wp-includes/js/wp-embed.js`
* `wp-includes/js/comment-reply.js`
I can also envision that eventually any such `search-form.js` could
eventually include functionality for autocomplete and other search
functionality.
Having a separate file allows it to be linted and QUnit-tested.
But I'll defer to others' ultimate recommendation on whether this should
be in a separate JS file.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34886#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list