Reply To: Troubleshooting

PennController for IBEX Forums Troubleshooting Reply To: Troubleshooting

#9843
ediachek
Participant

Hi Jeremy,

Happy New Year!

I have multiple input boxes on each trial and for some reason, the cursor gets focused on the last one. I know you can use the <input autofocus> attributed in HTML but haven’t figured out how to do that in PennController.

Here is how I tried to do it:

        newTextInput("agent_answer", "")
            .size(200,25)
            .css("margin-right","0.75em")
            .css("border","none")
            .css("border-bottom","2px solid black")
            .css("resize","none")
            .css("font-size","18px")
            .css("outline","none")
            .css("text-transform", "uppercase")
            .css("font-family","Helvetica")
            .css("autofocus","autofocus")
            .log()
        ,

Here is the link to my experiment:
https://farm.pcibex.net/r/ULYbzc/

I would appreciate your help!

Best,
Yev