Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Fixed chrome non-unique id error #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions iron-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<slot></slot>

<!-- This form is used for submission -->
<form id="helper" action$="[[action]]" method$="[[method]]" enctype$="[[enctype]]"></form>
<form class="helper" action$="[[action]]" method$="[[method]]" enctype$="[[enctype]]"></form>
</template>

<script>
Expand Down Expand Up @@ -318,7 +318,7 @@

// Remove any existing children in the submission form (from a previous
// submit).
this.$.helper.textContent = '';
this.$$('.helper').textContent = '';

var json = this.serializeForm();

Expand All @@ -327,17 +327,17 @@
// If we're submitting the form natively, then create a hidden element for
// each of the values.
for (var element in json) {
this.$.helper.appendChild(
this.$$('.helper').appendChild(
this._createHiddenElement(element, json[element]));
}

// Copy the original form attributes.
this.$.helper.action = this._form.getAttribute('action');
this.$.helper.method = this._form.getAttribute('method') || 'GET';
this.$.helper.contentType = this._form.getAttribute('enctype') ||
this.$$('.helper').action = this._form.getAttribute('action');
this.$$('.helper').method = this._form.getAttribute('method') || 'GET';
this.$$('.helper').contentType = this._form.getAttribute('enctype') ||
'application/x-www-form-urlencoded';

this.$.helper.submit();
this.$$('.helper').submit();
this.fire('iron-form-submit');
} else {
this._makeAjaxRequest(json);
Expand Down