| Reference | Downloads | Github

Bug Report: Button component registers clicks from previous routine

I’m on version 2021.1.4 and encountered a bug with the button component. If two routines following each other have a button in the same spot, and the first button press ends the first routine, then your mouse will still be in the same spot in a pressed state when the next routine starts. This way you will skip all the other routines following the first one immediately, if they have a routine-ending button in the same spot.

Finding that one took me quite a while, in the end I fixed it manually by rebuilding the button code, in a way the ends the routine on button release instead of on button-push.

1 Like

You should be able to clear events in Begin Routine

Try event.clearEvents() in code component above the Button

Thank you, that solution worked as well! But I still would like to report this as a bug, it does not seem like intended behaviour. Do you know where the appropriate place is for that?

The best place to report bugs is the Issues list on GitHub: Issues · psychopy/psychopy · GitHub

Thank you, I submitted the issue!

Later on I realized, that event.clearEvents() didn’t fix the issue. I accidentally worked around the issue another way (I required that there had to be input on a slider in order to end the routine).

thanks for the awesome information.

thanks for the awesome information.