diff --git a/src/dom/dom.js b/src/dom/dom.js index ad19e8fbd4..f1084a74a8 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -229,7 +229,8 @@ p5.prototype._wrapElement = function (elt) { children.length > 0 && children.every(function (c) { return c.tagName === 'INPUT' || c.tagName === 'LABEL'; - }) + }) && + (elt.tagName === 'DIV' || elt.tagName === 'SPAN') ) { return this.createRadio(new p5.Element(elt, this)); } else {