[wp-trac] [WordPress Trac] #34886: Search Form should not submit empty strings

WordPress Trac noreply at wordpress.org
Sun Dec 6 21:29:40 UTC 2015


#34886: Search Form should not submit empty strings
-------------------------+------------------------------
 Reporter:  gibrown      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Widgets      |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by gibrown):

 The patch was also tested to verify that an existing onclick jQuery event
 that has been attached to the search button will still fire with:

 {{{#!php
 <?php
 wp_enqueue_script( 'jquery' );

 function myscript() {
     ?>
     <script type="text/javascript">
         jQuery(document).ready(function () { jQuery("#searchsubmit").on(
 "click", function(){ alert("yes"); }); });
     </script>
     <?php
 }
 add_action( 'wp_footer', 'myscript', 1000 );

 }}}

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


More information about the wp-trac mailing list