Skip to content

Commit

Permalink
JI-5499 Fix both radio and checkbox reset on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
icc committed Sep 28, 2023
1 parent 4576f6b commit 2457e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/simple-multiple-choice.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ export default class SimpleMultiChoice extends H5P.EventDispatcher {
*/
this.resetTask = function () {
this.state = this.state.map(option => ({ ...option, checked: false }));
this.$wrapper?.get(0)?.querySelectorAll('input[type=checkbox]').forEach(el => {
el.removeAttribute('checked');
this.$wrapper?.get(0)?.querySelectorAll('input[type=checkbox], input[type=radio]').forEach(el => {
el.checked = false;
});
};

Expand Down

0 comments on commit 2457e53

Please sign in to comment.