Obojobo
Obojobo copied to clipboard
Issue/2025 When enter/return key is pressed the input is saved
Since onFormSubmit function was already implemented to listen and trigger when the enter key is pressed in practice mode, I went there and added code in the preexisting if statement that sends the response to be saved in assessment mode. Now a keyboard user is able to use the enter key to save numeric input responses.
OnEnterPress function was added to delay the refocus of numeric input on enter press in order to to avoid refocusing when a lot of rendering is going on. Unit test added to test that focus is executed at the delay. Now upon enter press the input should retain focus and the answer be saved on all browser types.