-
Type:
Bug
-
Status: Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 15.0.17.32
-
Fix Version/s: 15.0.17.33
-
Component/s: FreePBX Framework
-
Labels:None
-
ToDo:
-
Module Fix Version:
Action bar click event function ins script.legacy.js can call warnInvalid() for disabled fields if an enabled field is also invalid.
The click event function checks for invaild fields using html's checkValidity() function.
checkValidity iself ignores disabled fields, but a disabled field can still have an invalid status when checked individually. The loop used if after failing checkValidity checks each field's validity status without regard to the disabled property.
If all enabled fields are valid, checkValidity succeeds and all proceeds as expected.
The problem manifests if an enabled field is invalid and a disabled field is also invalid. The result is checkValidity fails because of the enabled field, but the loop may find and try to warn/give focus to the disabled field.
Proposed fix is simple: add a field.willValidate check to the loop code and ignore anything checkValidity ignores.