1

I have javascript function that listens to any change in value made to coral-FileUpload element on the cq dialog.

$('coral-FileUpload').on('change', (event) => {
            // my code
});

The above code works fine when any asset is dropped from DAM. However, it does not detect any change when the 'clear' button is clicked.

infinityskyline
  • 369
  • 2
  • 4
  • 17

2 Answers2

0

Check the documentation over at https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/reference-materials/coral-ui/coralui3/Coral.FileUpload.html#Coral.FileUpload:events it looks like you need to bind your javascript to another event

atgar
  • 216
  • 1
  • 2
0

You can write this:

$(".cq-FileUpload-clear").on('click', (event) => {
       //your code 
});
rafc
  • 78
  • 11