[wp-trac] [WordPress Trac] #23362: HTML5 form validation breaks post save UI

WordPress Trac noreply at wordpress.org
Fri Feb 1 22:12:42 UTC 2013


#23362: HTML5 form validation breaks post save UI
-----------------------------+-------------------------
 Reporter:  westonruter      |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Validation
  Version:  trunk            |   Severity:  minor
 Keywords:  has-patch        |
-----------------------------+-------------------------
 Consider a metabox added to the edit post screen which includes fields
 that utilize HTML5 form validation constraints (by supplying a specific
 `type` attribute or the `required` or `pattern` attributes). Normally upon
 hitting the Publish or Save Draft button, the buttons go disabled and a
 spinner appears until the page reloads. However, if any of the metabox
 input fields violate the HTML5 form validation constraints, then upon
 hitting a submit button the browser will display the native validation
 error messages, but the Save Draft and Publish buttons will still go into
 their disable state and the spinner will appear, even though the `submit`
 event never fired. This unfortunately discourages the use of HTML5 form
 validation and forces plugin authors to include a `formnovalidate`
 attribute on such input fields.  Attached is a patch that allows input
 fields to use HTML5 form validation constraints and which prevents the UI
 from going into an an indeterminate/broken state. See attached screenshot
 for a depiction of the issue.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23362>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list