Bug 16399 - 'reset the form owner' algorithm issue
'reset the form owner' algorithm issue
Status: RESOLVED FIXED
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec
unspecified
All All
: P2 normal
: ---
Assigned To: Ian 'Hixie' Hickson
HTML WG Bugzilla archive list
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 06:42 UTC by Kent Tamura
Modified: 2012-05-07 23:18 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-03-16 06:42:55 UTC
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#reset-the-form-owner

If we follow this algorithm, a form control which is not in a document tree AND not in any form orphan tree can be associated to a form element.

Example:

<html>
<body>
<form id=f1>
</form>
<script>
var input1 = document.createElement('input');  // form owner is null.
input1.setAttribute('form', 'f1');  // Need 'reset the form owner'.
// The owner form of input1 should be f1 according to the specification.
// f1.elements should contain input1, but document-order is undefined for input1.
</script>

Proposal:
Fix the following sentence:

3. If the element has a form content attribute, then run these substeps:
  ==>
3. If the element has a form content attribute and is in a Document subtree, then run these substeps:
Comment 1 Ian 'Hixie' Hickson 2012-05-07 23:17:28 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 2 contributor 2012-05-07 23:18:56 UTC
Checked in as WHATWG revision r7092.
Check-in comment: Don't associate using form='' if you're not in a document
http://html5.org/tools/web-apps-tracker?from=7091&to=7092