Empty text box producing error when running in browser

Hi there,

since the update to 2020.2 I experience a weird problem. When I implement an empty text box (i.e., containing no text) the PsychoJS compiler produces a code like this:

text_check1 = new visual.TextStim({
    win: psychoJS.window,
    name: 'text_check1',
    text: /*  */
  ,
    font: 'Arial',
    units: undefined, 
    pos: [0, (- 0.2)], height: 0.2,  wrapWidth: 1.5, ori: 0,
    color: new util.Color('black'),  opacity: 1,
    depth: -4.0 
  });

When starting the experiment in the browser (from pavlovia or locally) firefox and chrome throw the following error in the console:

Uncaught SyntaxError: expected expression, got ','

Simply entering a space in the text box circumvents the problem. However, in some situations, this is not an option for me.

Does anybody experience the same problem? Is there a way to solve this?

Thanks!
Adrian

Hello Adrian,

this is a bug which has not been solved yet. I have a similar problem. I set the text to a “dummy-text”. See for another solution here.

Cheers Jens

Hi Jens,

thanks for pointing me to this threat!

Adrian