Textbox (Beta) focus problem for online. How to fix or what is the alternative?

URL of experiment:

Description of the problem:
Hi Folks.

So I understand that the Textbox component is in beta, and has problems online. But… I have played around with it - and got it to more or less work to do what I want online - apart from the ‘Focus’ problem I have seen other people talk about.

I am trying to gather a freetext response from a user. (Actually typically only a number from 1 to 100 or similar - but it is important that it could be ANY number - so a slider or similar will not work).

The first few textboxes I use only happen once - so that’s fine. If you do the experiment, a bit later - participants are asked for a confidence rating for a decision. And now… the first time the Textbox displays it work perfectly. It has focus, a (wierd barely visibile) cursor, but that’s fine - I can click in the box and enter text. Cool.

On the next iteration of the loop - The textbox displays but I cannot get it to take focus - and therefore cannot enter text.

So is there a workaround for this? OR…

By what other means can I get my users to type some text into a field and record that?

Thanks for any help.



The workaround is here: Editable Textbox no autofocus online - #2 by Becca

However, I still prefer to use a coded solution for free (or restricted) typing. Several of my demos use a typed response, such as Digit Span (limited to digits), Free Recall, and Key Check.

Thanks so much @wakecarter. For your help here and elsewhere.

I’m afraid I don’t understand your reference to a ‘a coded solution’. By this do you mean an experiment built entirely in Python without the aid of Builder at all?

Also - I would like to have a look at the experiments/demos you mention. How should I find these? if I go the Pavlovia ‘browse’ page and enter ‘digit’ and ‘span’ in the search field (spaces seems to create two different search terms - I can’t see a project authored by you. And there are a LOT of digit span experiments. Hmmm…

I clicked through to the code page of this one: demos / Digit Span Task · GitLab

And then clicked on the xxxx.psyexp - but this didn’t look to me like an experiment code and just long lists of variables (XML? dunno - I’m not that much of a coder).

Any chance some quick guidance on how to find/examine the projects you mentioned?



By coded solution I mean code components for the text input within Builder.

The demos I mentioned are on the post I linked to.in my previous post.

Ah - Sorry - there’s the link! Cool. Thanks.

And with the ‘code components’ you mean - you hand-code a text input object? Anyway - I’ll have a look at those projects now and hack around a bit.

Thanks again.