Question T6890
Visible to All Users

onValueChanged lose input focus

created 4 years ago

I'm using surveyJS with react and if I use the onValueChanged property, the survey always loses the focus on the input I was answering.
Is there a way to get the user values for every input he fills without losing the survey focus ?

Answers approved by surveyjs Support

created 4 years ago

Hello,

I've check our online demo - https://surveyjs.io/Examples/Library?id=questiontype-text&platform=Reactjs&theme=modern - and it works ok for me.
Can you share the exact steps to reproduce the issue?

Thanks, Serge
SurveyJS Team

    Comments (3)

      Hi Serge, thanks for your response.
      This example does not use the onValueChanged event, only the onComplete one.
      I would like to use that instead.

        I'm using the built-in survey component and passing the parameters there.

        HTML
        <Survey.Survey model={model} onValueChanged={handleChange} data={data} focusFirstQuestionAutomatic={false} />

        Does this code snippet help ?

          Hello,
          Please fork this example, modify it to reproduce the issue, copy a new link here and provide steps to reproduce it.

          Thank you,
          Andrew
          SurveyJS Team