Check response category before deleting content
Summary
When a response is added to an item, e.g. in the Common Format, changing the response type will delete the written content without the warning, even if the same category is clicked.
Steps to reproduce
- Create a new Common Format item.
- Choose a random name.
- Fill Assignment and Common areas with Lorem Ipsum.
- Select as Response Type "Multiple Choice"
- Use Lorem Ipsum as Response Text and add a few Response Choices
- Click on the Dropdown Menu to change the Response type.
- Click on "Multiple Choice" again.
What is the current bug behavior?
All content is lost even though no new response format was selected.
What is the expected correct behavior?
Nothing should happen if the format is kept. If it actually is changed, a warning that the current content will be lost should be prompted.