#23951Clearing input field using clear icon doesn't get saved.
Description
When clearing a input field using the new clear icon, the field is emptied, but when saved, the old values are restored.
This because only the visible field is changed, not the actual field which is submitted.
It turns out that the onchange functionality gets changed after it is added to the clear icon.
Solution, move the assignment of the clear function a couple of lines down.
How to reproduce:
- Create a tt_content record and enter something in the header.
- Save the record and edit again.
- Clear the header using the clear icon.
- Save record again.
Without the patch the old value is restored.
(issue imported from #M16261)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.