Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
dew326 committed Oct 10, 2024
2 parents 5f42f11 + 0c6eb3b commit 87195b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@
this.inputField = clonedInput;
this.inputField.addEventListener('change', this.handleInputChange, false);
this.fieldContainer.querySelector('.ibexa-field-edit__option--remove-media').checked = true;
this.fieldContainer.querySelector('.ibexa-field-edit-preview__image-alt .ibexa-data-source__input').value = '';

this.validator.reinit();
}
Expand Down
6 changes: 6 additions & 0 deletions src/bundle/Resources/public/js/scripts/fieldType/ezimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
preview.querySelector('.ibexa-field-edit-preview__action--preview').href = URL.createObjectURL(files[0]);
this.fieldContainer.querySelector(SELECTOR_INPUT_ALT).dispatchEvent(new CustomEvent(EVENT_CANCEL_ERROR));
}

resetInputField() {
super.resetInputField();

this.fieldContainer.querySelector('.ibexa-field-edit-preview__image-alt .ibexa-data-source__input').value = '';
}
}

class EzImageFieldValidator extends ibexa.BaseFileFieldValidator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
super.resetInputField();

this.inputDestinationContentId.value = '';
this.fieldContainer.querySelector('.ibexa-field-edit-preview__image-alt .ibexa-data-source__input').value = '';
}

/**
Expand Down

0 comments on commit 87195b5

Please sign in to comment.