I programmed an online experiment using the standalone PsychoPy builder and custom Python and JS code. I have a trial with a slider, where they have to click on the slider and then press space to end the routine. When I run the online experiment in a Google Chrome browser, it works perfectly. However, when I run the online experiment in Firefox, the slider shows up, but the numbers under the slider are missing, and the marker does not draw when pressed.
Here is the custom code I used in every frame
Python:
keys = event.getKeys()
if ‘escape’ in keys:
core.quit()
if ‘space’ in keys:
if CoinSlider.getRating() is not None:
continueRoutine = False # end now
JS:
let theseKeys = psychoJS.eventManager.getKeys({keyList:[‘space’]});
// check for quit:
if (theseKeys.indexOf(‘escape’) > -1) {
psychoJS.experiment.experimentEnded = true;
}
if (theseKeys.length > 0) { // at least one key was pressed
if (CoinSlider.getRating() !== undefined) {
continueRoutine = false; // end now
}
}
With CoinSlider being the name of my slider.
This issue seems specific for Firefox but does anyone have a work around?