Skip to content

Commit

Permalink
Merge pull request #802 from adobecom/MWPW-157166
Browse files Browse the repository at this point in the history
MWPW-157166
  • Loading branch information
Blainegunn authored Sep 16, 2024
2 parents c5734f0 + 6bc2369 commit 5ab1856
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions acrobat/blocks/verb-widget/verb-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ export default async function init(element) {
verbAnalytics('dropzone:choose-file-clicked', VERB);
});

button.addEventListener('change', (e) => {
verbAnalytics('choose-file:open', VERB);
e.target.value = '';
});

button.addEventListener('cancel', () => {
verbAnalytics('choose-file:close', VERB);
});
Expand All @@ -123,14 +118,18 @@ export default async function init(element) {
setDraggingClass(widget, false);
});

widget.addEventListener('drop', (e) => {
e.preventDefault();
verbAnalytics('files-dropped', VERB);
setDraggingClass(widget, false);
});

errorCloseBtn.addEventListener('click', () => {
errorState.classList.remove('verb-error');
errorState.classList.add('hide');
});

window.addEventListener('unity:track-analytics', (e) => {
if (e.detail.event === 'change') {
verbAnalytics('choose-file:open', VERB);
}
if (e.detail.event === 'drop') {
verbAnalytics('files-dropped', VERB);
setDraggingClass(widget, false);
}
});
}

0 comments on commit 5ab1856

Please sign in to comment.