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

Remove need to unfocus/deselect input elements in DlgFromDict before being able to click the "Ok" button

GlobalEventHandlers.onchange only fires when focus is lost. However .oninput fires whenever contents are modified. Original requires "double click" behaviour: first click to deselect the input element, second click to actually click the "Ok" button. Old code results in "Ok" buttons remaining visually disabled thus confusing users even when input elements have been completed
This commit is contained in:
Sijia Zhao 2020-05-19 18:58:52 +01:00
parent e907c0c897
commit dd23484cf5

View File

@ -203,7 +203,7 @@ export class GUI
const keyId = $.escapeSelector(key) + '_id'; const keyId = $.escapeSelector(key) + '_id';
const input = document.getElementById(keyId); const input = document.getElementById(keyId);
if (input) if (input)
input.onchange = (event) => GUI._onKeyChange(self, event); input.oninput = (event) => GUI._onKeyChange(self, event);
} }
// init and open the dialog box: // init and open the dialog box: