We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi. I have text in a span, which upon mouseClicked() is to be replaced with an input field containing the value of this text for editing. I would like to have the input field focused and the text selected upon creation of the element, however the usual element.focus() and element.select() are not working.
Thanks in advance,
Dylan
Answers
Ah so I was able to work around this by creating another objectof this element, but this time with getElementById. I guess this is necessary because the function is not specific to the P5 library?
I guess property
elt
can access other HTML properties not officially covered by p5.js API.Thanks!