<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>257989</bug_id>
          
          <creation_ts>2023-06-12 16:55:47 -0700</creation_ts>
          <short_desc>Clearing of dirty for :user-invalid happens on wrong form event</short_desc>
          <delta_ts>2023-08-07 20:55:34 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>macOS 12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>257988</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Welsh">simon</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1961178</commentid>
    <comment_count>0</comment_count>
      <attachid>466673</attachid>
    <who name="Simon Welsh">simon</who>
    <bug_when>2023-06-12 16:55:47 -0700</bug_when>
    <thetext>Created attachment 466673
example.html

When submitting a form with validation errors, the :user-invalid dirty state is reset. When resetting a form, it is not.

In the attached form, dirty the &apos;not-an-email&apos; field with an invalid email address. The border will become red on blur.

If clicking the submit button, the form will fail validation but the red border will clear.

If clicking the reset button, the email field will return to its starting value but maintain the red border.


I&apos;d expect these behaviours to be reversed. That is submitting a form does not clear the dirty tracking and resetting a form does.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1962478</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-19 16:56:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/111014938&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970028</commentid>
    <comment_count>2</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-08-07 20:55:34 -0700</bug_when>
    <thetext>I&apos;ll address this in bug 257988.

*** This bug has been marked as a duplicate of bug 257988 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>466673</attachid>
            <date>2023-06-12 16:55:47 -0700</date>
            <delta_ts>2023-06-12 18:03:57 -0700</delta_ts>
            <desc>example.html</desc>
            <filename>file_257989.html</filename>
            <type>text/html</type>
            <size>494</size>
            <attacher name="Simon Welsh">simon</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCiAgICA8aGVhZD4NCiAgICAgICAgPHN0eWxlPg0KICAg
ICAgICAgICAgaW5wdXQ6dXNlci1pbnZhbGlkIHsNCiAgICAgICAgICAgICAgICBib3JkZXI6IDFw
eCByZWQgc29saWQ7DQogICAgICAgICAgICB9DQogICAgICAgIDwvc3R5bGU+DQogICAgPC9oZWFk
Pg0KICAgIDxib2R5Pg0KICAgICAgICA8Zm9ybT4NCiAgICAgICAgICAgIDxpbnB1dCByZXF1aXJl
ZCAvPg0KICAgICAgICAgICAgPGlucHV0IHR5cGU9ImVtYWlsIiB2YWx1ZT0ibm90LWFuLWVtYWls
IiAvPg0KICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPSJzdWJtaXQiPg0KICAgICAgICAgICAgICAg
IFN1Ym1pdA0KICAgICAgICAgICAgPC9idXR0b24+DQogICAgICAgICAgICA8YnV0dG9uIHR5cGU9
InJlc2V0Ij4NCiAgICAgICAgICAgICAgICBSZXNldA0KICAgICAgICAgICAgPC9idXR0b24+DQog
ICAgICAgIDwvZm9ybT4NCiAgICA8L2JvZHk+DQo8L2h0bWw+DQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>