-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #5207 #5495
Fixes #5207 #5495
Conversation
🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already. And be sure to add yourself to the list of contributors on the readme page! |
Indeed I cross-pollinated there. It's reverted, but if you'd like I could reclone p5.js and resubmit the pull without the extra commits. |
Let me just take a second to express some misgivings I have with the code / my fix.
p5.prototype.select = function(e, p) {
...
return this._wrapElement(res);
...
}
p5.prototype._wrapElement = function(elt) {
... # checks elt.tagName and elt.children conditions
# usually returns new p5.Element(elt, this)
# but in our case:
return this.createRadio(new p5.Element(elt, this));
... Our problem is I changed But why is Assuming so, my fix modifies That is all. /end |
Resolves #5207
Changes:
in src/dom/dom.js:
Altered
p5.prototype.createRadio()
to check for typep5.Element
argument. Followed existingp5.prototype.createSelect
logic.PR Checklist
npm run lint
passesnpm run grunt
passes