do allow Enter to proceed to next step if survey fields invalid

This commit is contained in:
Keith Grant 2019-06-04 16:08:23 -07:00
parent 67fb898a9d
commit 4a7cd56e4a

View File

@ -229,6 +229,12 @@ export default [ 'ProcessErrors', 'CredentialTypeModel', 'TemplatesStrings', '$f
};
vm.keypress = (event) => {
if (vm.steps.survey.tab._active && !vm.readOnlyPrompts && !vm.forms.survey.$valid) {
return;
}
if (document.activeElement.type === 'textarea') {
return;
}
if (event.key === 'Enter') {
vm.next(activeTab);
}