surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.2k stars 812 forks source link

Keyboard tab can work incorrectly on using visibleIf/enabledIf #4962

Open andrewtelnov opened 2 years ago

andrewtelnov commented 2 years ago

If you have the following JSON, then on changing company name, focus goes to "Complete" button instead of "vat" question.

{
elements: [
    { type: 'text', name: 'companyName', title: 'Company Name' },
    {
      type: 'text',
      name: 'vat',
      title: 'Company VAT Number (EU companies only)',
      enableIf: '{companyName} notempty',
    }
]
}

UPD: The issue happens for text and comment questions. radiogroup, dropdown, checkboxes and other questions do not have this issues, since they do not update their values on blur. To avoid this issue for text and comment questions, "textUpdateMode" property can be set to "onTyping".

JaneSjs commented 2 years ago

+1 T10993 - visibleIf - new questions become visible when tabbing out of last question and Previous button highlighted