Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
1. select a task in the tasklist (with an embedded form, see attached)
2. select some value on a select control of the embedded form
3. refresh the browser page
4. select another value on the same select control of the embedded form
Change on a select control is not detected, the Save button is not enabled. Please see attached reproduction GIF.
The change on a select control is detected. It should be possible to continue saving changes after refreshing the browser or logout/login Camunda.
When a form field of type select is used, the logic of the directive camVariableType is first executed initially and executed again when the form field's value is set (cf. choices-field-handler.js ) via a saved value or from a variable. In the first run, $pristine is false, but in the second run, it is true (due to setting the respective option from the saved state or fetched from a form variable). When $pristine is true, the camVariableType directive changes $pristine to false and $dirty to true (cf. angularjs/forms/index.js ). This makes the select dirty even though the user didn't touch it. This, in turn, leads to the described bug. Since $dirty was set programmatically, changing the select does not change the dirty state for the entire form, so the Save button remains disabled.
Remove logic to programmatically make input fields dirty.
Changes to other controls are detected after the refresh.