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

Resolve issue with slots being marked as valid submittable elements #298

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
8 changes: 6 additions & 2 deletions iron-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,12 @@ Polymer({
for (var i = 0; i < nodes.length; i++) {
// An element is submittable if it is not disabled, and if it has a
// name attribute.
if (!skipSlots &&
(nodes[i].localName === 'slot' || nodes[i].localName === 'content')) {
var isSlot = nodes[i].localName === 'slot' || nodes[i].localName === 'content';
if (skipSlots && isSlot) {
continue;
}

if (isSlot) {
this._searchSubmittableInSlot(submittable, nodes[i], ignoreName);
} else {
this._searchSubmittable(submittable, nodes[i], ignoreName);
Expand Down