Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Changed cursor to No-Drop Ø Symbol when trying to upload many files/f… #507

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 5 additions & 1 deletion frontend/src/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ $(() => {
function onUpload(event) {
event.preventDefault();
const clickOrDrop = event.type === 'drop' ? 'drop' : 'click';

event.currentTarget.style.cursor = 'default';
event.originalEvent.dataTransfer.effectAllowed = 'uninitialized';
event.originalEvent.dataTransfer.dropEffect = 'all';
// don't allow upload if not on upload page
if ($pageOne.attr('hidden')) {
return;
Expand All @@ -117,6 +119,8 @@ $(() => {
event.originalEvent.dataTransfer.files[0].size === 0
) {
$uploadWindow.removeClass('ondrag');
event.originalEvent.dataTransfer.dropEffect = 'none';
event.currentTarget.style.cursor = 'no-drop';
document.l10n
.formatValue('uploadPageMultipleFilesAlert')
.then(str => {
Expand Down