Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions unitylibs/core/workflow/workflow-upload/action-binder.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ export default class ActionBinder {
const alertToast = createTag('div', { class: 'alert-toast' }, alertContent);
const errholder = createTag('div', { class: 'alert-holder' }, alertToast);
alertClose.addEventListener('click', (e) => {
e.preventDefault();
e.stopPropagation();
this.preventDefault(e);
errholder.classList.remove('show');
element.style.pointerEvents = 'auto';
});
Expand Down Expand Up @@ -440,8 +439,7 @@ export default class ActionBinder {
DIV: (el, key) => {
el.addEventListener('drop', async (e) => {
sendAnalyticsEvent(new CustomEvent('Drag and drop|UnityWidget'));
e.preventDefault();
e.stopPropagation();
this.preventDefault(e);
const files = this.extractFiles(e);
await this.executeActionMaps(actMap[key], files);
});
Expand Down Expand Up @@ -490,6 +488,8 @@ export default class ActionBinder {
window.location.reload();
}
});
window.addEventListener('dragover', this.preventDefault.bind(this), false);
window.addEventListener('drop', this.preventDefault.bind(this), false);
}

preventDefault(e) {
Expand Down
Loading