Open JaneSjs opened 2 months ago
The problem is in knockout. question.koValue() returns an empty array and changing question.koValue() does't seems to change anything. The input continiues to show empty color value.
This is the default behavior for an input element. If you change the input type from color
to text
, the "#000000" color value is a valid string and it will be preserved as an input element value. It seems like framevorks like react, angular and others update value from a virtual dom, but knockoutjs doesn't do it.
We plan to get rid of survey-knockout
in V2. On the other hand, this issue doesn't seem critical. That's why we won't fix it right now. I marked it as a known issue. We will keep it open.
T18022 - Value not reset on change from text->color->text https://surveyjs.answerdesk.io/internal/ticket/details/T18022
Please follow these steps to reproduce the issue: Change the input type from Text to Color and then back to Text. The
#000000
value appears:https://github.com/surveyjs/survey-creator/assets/22372972/bda55508-bcbd-4be7-a8c6-89eb0e4854ca