Obojobo icon indicating copy to clipboard operation
Obojobo copied to clipboard

Issue/2025 When enter/return key is pressed the input is saved

Open RachelDau opened this issue 2 years ago • 1 comments

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.

RachelDau avatar Oct 10 '22 15:10 RachelDau

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.

RachelDau avatar Nov 07 '22 16:11 RachelDau