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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>16845</bug_id>
          
          <creation_ts>2012-04-24 23:00:02 +0000</creation_ts>
          <short_desc>Some algorithms in the HTML Parser must also override the &quot;reset the form owner&quot; (e.g., Adoption Agency algorithm)</short_desc>
          <delta_ts>2013-07-11 22:25:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>CR</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Travis Leithead [MSFT]">travil</reporter>
          <assigned_to name="Travis Leithead [MSFT]">travil</assigned_to>
          <cc>eoconnor</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>tross</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66996</commentid>
    <comment_count>0</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-04-24 23:00:02 +0000</bug_when>
    <thetext>We traced a real-world site issue [1] to an ambiguity in the HTML5 parsing spec regarding the magical &quot;form owner&quot;. For a refresher, the HTML5 spec says:

4.10.18 &gt;

| When a form-associated element&apos;s ancestor chain changes, e.g. because
| it or one of its ancestors was inserted or removed from a Document, 
| then the user agent must reset the form owner of that element. The 
| HTML parser overrides this requirement when inserting form controls.

...so, DOM operations that move elements around should reset the form owner. Cool. So, then what&apos;s the caveot with the HTML parser? It&apos;s here:

8.2.5.1 &gt;

| If an element created by the insert an HTML element algorithm is a 
| form-associated element, and the form element pointer is not null, 
| and the newly created element doesn&apos;t have a form attribute, the 
| user agent must associate the newly created element with the form 
| element pointed to by the form element pointer when the element is 
| inserted, instead of running the reset the form owner algorithm.

...OK. This only identifies the &quot;insert an HTML element algorithm&quot; as meeting this requirement. This is what IE10 implemented. However, it turns out that the above exception is too narrow. 

4.10.18 should add that any algorithm employed by the HTML5 parser (such as the Adoption Agency algorithm), also overrides this behavior. Suggested text for the note:

&quot;Note: The HTML parser overrides this requirement when inserting *or re-arranging* form controls, such as in the Adoption Agency algorithm.&quot;

The modified note above appears to match the behavior we are seeing currently in Firefox and Chrome, and is compatible with existing web content.

[1] http://www.elightbulbs.com/shopping_cart_process.cfm?action=pre_checkout</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70161</commentid>
    <comment_count>1</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 07:01:45 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17845 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74283</commentid>
    <comment_count>2</comment_count>
    <who name="Edward O&apos;Connor">eoconnor</who>
    <bug_when>2012-09-21 23:55:12 +0000</bug_when>
    <thetext>Travis, seeing as you reported this, would you like to take a stab at the spec change?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74361</commentid>
    <comment_count>3</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2012-09-24 18:45:09 +0000</bug_when>
    <thetext>I&apos;ll give it a shot. Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83064</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-02-12 23:20:25 +0000</bug_when>
    <thetext>Do you have precise steps to reproduce for this issue? I tried reproducing it but could not. See also bug 17845 comment 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90654</commentid>
    <comment_count>5</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2013-07-11 22:25:21 +0000</bug_when>
    <thetext>Per discussion on linked bug, deciding not to fix this to match Chrome behavior.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>