[wp-trac] [WordPress Trac] #44284: Remove e.preventDefault(); code line from widgets.js file

WordPress Trac noreply at wordpress.org
Fri Jun 1 16:10:34 UTC 2018


#44284: Remove e.preventDefault(); code line from widgets.js file
-----------------------------------------------+---------------------------
 Reporter:  alexvorn2                          |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  Widgets                            |     Version:  4.9.6
 Severity:  normal                             |  Resolution:
 Keywords:  has-screenshots reporter-feedback  |     Focuses:
-----------------------------------------------+---------------------------

Comment (by alexvorn2):

 Replying to [comment:7 woodent]:
 > @alexvorn2 Ah, but the `e.preventDefault()` is there to prevent the form
 from actually being submitted. The JavaScript handles updating the widget
 and allowing the form to submit would cause the page to reload and the
 user's state on the widget page would be lost.

 I tested and everything is fine for me, no page reload, if you think this
 function should stay - maybe move to other place (ex: after validation
 check)...

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


More information about the wp-trac mailing list