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

fixed issue with field options, e.g. |cfg, in GUI

This commit is contained in:
Alain Pitiot 2024-04-04 18:29:40 +02:00
parent 51674ab073
commit ff43ba400d

View File

@ -610,6 +610,12 @@ export class GUI
const input = document.getElementById("form-input-" + keyIdx); const input = document.getElementById("form-input-" + keyIdx);
if (input) if (input)
{ {
// deal with field options:
if (key.slice(-4) === "|req" || key.slice(-4) === "|cfg" || key.slice(-4) === "|fix" || key.slice(-4) === "|opt")
{
delete this._dictionary[key];
key = key.slice(0, -4);
}
this._dictionary[key] = input.value; this._dictionary[key] = input.value;
} }
}); });