Text Input Component causes a 'porthole effect' on other routine's display

OS (e.g. Win10): WIN 10
PsychoPy version 2023.2.2
**Standard Standalone? YES
What are you trying to achieve?:

Simply use a text box input component , (this is the new beta component)

What did you try to make it work?:

Created a minimal builder script to demo the issues

When I run the script the first routine ‘Instructions’ has a ‘porthole’ the same size as the intended textbox. If I disable the textbox input component the display doesn’t have the porthole and displays the ‘Instructions’ text and all displays intact. So it seems that enabling the component causes all screens to be subject to only having a porthole through which to view the pages content.
Struggling to understand how the component can affect all the pages in the script

Thanks in advance for any help



textInputBoxIssue.psyexp (19.0 KB)

Hi,

I’ve traced the bug to the Layout / Overflow parameter of the text box. It appears that if the textbox overflow is set to scroll then a window is created at the start of the experiment. I’ll follow this up with the team. It’s fine if overflow is set to visible.

Thank you for your prompt debugging that will work for us

When a :textbox: Textbox component is scrollable, the scrolling is done using an :aperture: Aperture behind the scenes. It should only be enabled when its corresponding Textbox is being drawn, so it looks like the bug here is the Aperture remaining enabled during the drawing of other stimuli… Thanks for finding this and sharing the psyexp file, it’ll be useful when fixing this.

1 Like

Think I have a fix for this now! Will put it in for the next release. As a temporary solution, you just need to add the following code as soon as possible after creating the Textbox (either Begin Experiment with the Code component below the Textbox in the Routine order, or Begin Routine):

myTextbox.container.disable()

It was working in our test scripts because, once the Textbox has been drawn once, the Aperture is correctly enabled/disabled so that it only applies to the Textbox. But our tests didn’t take into account the period before the Textbox has been drawn - which is what’s causing the problem here. So all it needs is disabling on creation so that there’s no Aperture during that time.

1 Like