Reply To: Unwanted new line in text input field

PennController for IBEX Forums Support Unwanted new line in text input field Reply To: Unwanted new line in text input field

#8336
Jeremy
Keymaster

Hello Sabrina,

Apparently there is a bug with the TextInput element whereby, if you release a keypress by the time the element is printed onto the page, that keypress is considered part of what you typed in the TextInput element. For some reason, the default 1-line limit on TextInput elements is overridden by that bug, which means that when, in your experiment, you validate a trial by pressing Enter (after selecting a value on the scale) by the time you release the keypress, the next trial’s TextInput has been printed and it therefore inserts a linebreak at the beginning

You can work around that by adding a slight delay at the beginning of the trial so that the participant should have released the keypress by the time the TextInput element is created, eg 250ms: newTimer(250).start().wait()

Jeremy