psychojs icon indicating copy to clipboard operation
psychojs copied to clipboard

Button: Positioning not always accurate if onset time is 0 (but clickable area is)

Open RebeccaHirst opened this issue 3 years ago • 2 comments

On some trials (although not always reliably) the Button is not created in the correct position, although oddly the "clickable" area is in the correct position.

In this demo the button should be at position -.4 on the y axis, and should therefore be fully visible and centered on the same location as the green "X". When I tested this on Chrome on windows however, the X was in the correct location but the Button appeared at -.5 (slightly offscreen) so it was not fully visible. Although the button was offscreen, the clickable area was correct (if you click just above the button the trial will end.

minimal bug demo: https://pavlovia.org/Consultancy/buttonpositionbug

RebeccaHirst avatar Jul 30 '21 14:07 RebeccaHirst

note: a temporary fix for this seems to be to not start the button at time 0 but slightly offset e.g. 0.1

RebeccaHirst avatar Jul 30 '21 15:07 RebeccaHirst

Thanks for the bug report @RebeccaHirst, it looks like this only happens when in fullscreen mode for some reason

thewhodidthis avatar Aug 05 '21 11:08 thewhodidthis