From 9c1594afe7be86d87e338a5d287544f6e4283c1f Mon Sep 17 00:00:00 2001 From: Dejan Lukic Date: Mon, 19 Apr 2021 16:45:20 +1000 Subject: [PATCH] Resolve issue with slots being marked as valid submittable elements --- iron-form.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/iron-form.js b/iron-form.js index cabdd1b..4cbf0c7 100644 --- a/iron-form.js +++ b/iron-form.js @@ -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);