<?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>22443</bug_id>
          
          <creation_ts>2013-06-25 06:50:14 +0000</creation_ts>
          <short_desc>[Shadow]: Form elements crossing shadow boundary</short_desc>
          <delta_ts>2015-05-27 03:22:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>26365</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Yuta Kitamura">yutak</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>annevk</cc>
    
    <cc>hayato</cc>
    
    <cc>jonas</cc>
    
    <cc>mounir</cc>
    
    <cc>sgrekhov</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>89784</commentid>
    <comment_count>0</comment_count>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2013-06-25 06:50:14 +0000</bug_when>
    <thetext>The Shadow DOM specification should specify the behavior of form elements
if they cross shadow boundary.

Specifically, it should clarify the behavior of pressing a submit button
(or calling submit() method of the input element) in the following cases:

(1)  &lt;form&gt; - - - {shadow-root}
                        |
                        +-- &lt;input type=&quot;submit&quot;&gt;

(2)  &lt;form&gt; - - - {shadow-root}
        |               |
        |               +-- &lt;content&gt;&lt;/content&gt;
        |
        +-- &lt;input type=&quot;submit&quot;&gt;

and encapsulation requirements of the following properties of form elements:

* HTMLFormElement.elements, length, &lt;getter&gt;(unsigned long), &lt;getter&gt;(DOMString)
* HTMLLabelElement.control
* HTMLInputElement.form (and others)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89819</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-06-25 15:34:38 +0000</bug_when>
    <thetext>Does this not cover it? http://www.w3.org/TR/shadow-dom/#html-forms</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89859</commentid>
    <comment_count>2</comment_count>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2013-06-26 01:19:01 +0000</bug_when>
    <thetext>Oops, didn&apos;t notice that section. However, the current wording is somewhat
vague:

* &quot;each shadow tree must scope its form elements and form-associated elements&quot;
  - What does &quot;scope&quot; mean?

* &quot;the form submission must continue to work as specified&quot;
  - What input elements are considered to be sent when the submit button is
    pressed? For example,

      &lt;form&gt; - - - {shadow-root}
         |               |
         |               +-- &lt;input type=&quot;hidden&quot; name=&quot;x&quot; value=&quot;1&quot;&gt;
         |               |
         |               +-- &lt;content select=&quot;#sub&quot;&gt;&lt;/content&gt;
         |
         +-- &lt;input type=&quot;hidden&quot; name=&quot;y&quot; value=&quot;2&quot;&gt;
         |
         +-- &lt;input id=&quot;sub&quot; type=&quot;submit&quot;&gt;

    What should be sent if one presses the submit button? &quot;x=1&amp;y=2&quot;,
    &quot;x=1&quot;, or &quot;y=2&quot;? What&apos;s the form owner of &lt;input name=&quot;x&quot;&gt;?
    What about &lt;input name=&quot;y&quot;&gt;?

 - In the example (1) above, &lt;input&gt; element&apos;s form owner is null,
   thus pressing the button does nothing; am I correct?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90878</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-17 20:21:53 +0000</bug_when>
    <thetext>*** Bug 20320 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105136</commentid>
    <comment_count>4</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2014-05-05 23:42:21 +0000</bug_when>
    <thetext>I don&apos;t think that &lt;input&gt;s in a Shadow DOM should get any special behavior compared to other &lt;input&gt;s that are not in the document. I.e. I don&apos;t think they should submit with a &lt;form&gt; that lives in a document. 

See my comment in bug 25562 comment 6 for why.

That said, I think that we should implement the system described here http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0448.html

And we could even add special features for making it easier to submit &lt;input&gt;s that live in a Shadow DOM. One way to do that would be to add a .formData property on DocumentFragment or ShadowRoot. That way the implementation of .formData on a custom element would simply be

function formData() {
  return this.shadowRoot.formData();
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120526</commentid>
    <comment_count>5</comment_count>
    <who name="Hayato Ito">hayato</who>
    <bug_when>2015-05-27 03:22:24 +0000</bug_when>
    <thetext>Moved to https://github.com/w3c/webcomponents/issues/65</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>