Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.3.0.GA_P02, 4.0
-
Fix Version/s: EE-4.0.0.GA, EE-3.3.0.GA_P03, 4.1
-
Component/s: ACE-Components
-
Labels:None
-
Environment:All
-
Assignee Priority:P1
-
Support Case References:Support Case #13301 - https://icesoft.my.salesforce.com/50070000011u9MW
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
Description
If multiple rows are set to be editable and changes are made on the cells, if one row is submitted and row edits are cancelled via the server side, the changed value is updated. The same behavior is not seen with a single row edit, nor does it do this if one row edit hasn't been saved.
The following steps can be used to reproduce the issue with the Showcase demo:
Steps:
1. Click edit for any row.
2. Click edit for another row.
3. Change a value in both rows
4. Submit just one row over the little blue checkmark
5. Now you have one row in edit modus with a changed value. Click on the button "Stop Editing For All"
6. Editing is stopped but the changed value is submited.
If you do these steps with one edited row there are no changed valus submited.
The following steps can be used to reproduce the issue with the Showcase demo:
Steps:
1. Click edit for any row.
2. Click edit for another row.
3. Change a value in both rows
4. Submit just one row over the little blue checkmark
5. Now you have one row in edit modus with a changed value. Click on the button "Stop Editing For All"
6. Editing is stopped but the changed value is submited.
If you do these steps with one edited row there are no changed valus submited.
Committed fix to 4.0 trunk at revision 44102 and to 3.3 EE maintenance branch at revision 44103.
The initial fix was simply to avoid processing decodes for ace:cellEditor children when the source of the request isn't the save edits button. However, because of the same reason, domdiff was erasing the inputs entered in other rows in edit mode, when the whole form was being submitted, including requests to save edits of a specific row. So, if two or more rows were in edit mode, and the inputs were edited in some or all of them, after clicking the save edits button for one row, all the other edited inputs were revered to their values in the server, because of a domdiff mechanism that does this. Therefore, a mechanism was added to remove name attributes from input fields inside cell editors, and thus avoid that domdiff see these changes (and revert them). The name attributes are restored when the save edits button is activated for the current row.
Testing notes: please try different use cases that a typical user may have, like having several rows in edit mode, editing them and only saving some of them; submitting the whole form via submit button or causing a full form or full table update, etc. Values in edit mode rows should only be saved when clicking the save edits button of their corresponding row.