1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-11 16:18:10 +00:00

BF OK button enabled only after resources are downloaded

This commit is contained in:
Alain Pitiot 2022-12-07 17:00:23 +01:00 committed by GitHub
parent 0e659b0856
commit 6405c74fcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -611,19 +611,16 @@ export class GUI
// locally the OK button is always enabled, otherwise only if all requirements have been fulfilled:
if (this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL || allRequirementsFulfilled)
{
this._okButton.classList.add("dialog-button");
this._okButton.classList.remove("disabled");
if (changeOKButtonFocus)
{
this._okButton.classList = ["dialog-button"];
this._okButton.focus();
}
else
{
this._okButton.classList = ["dialog-button"];
}
}
else
{
this._okButton.classList = ["dialog-button", "disabled"];
this._okButton.classList.add("dialog-button", "disabled");
}
}