kora icon indicating copy to clipboard operation
kora copied to clipboard

Safari Drag and Drop

Open mikelsav opened this issue 6 years ago • 15 comments

Drag and Drop currently not supported

mikelsav avatar Apr 11 '18 18:04 mikelsav

This needs to be fixed for all file inputs.

fritosxii avatar Apr 30 '18 18:04 fritosxii

drag n drop for user profile pictures handled in user/edit.js:131

currently can't navigate to edit-profile page, I will fix this issue first in order to address this one I am commenting on here

suuuth avatar Jun 19 '18 14:06 suuuth

Reference #165 for edit user

fritosxii avatar Jun 19 '18 14:06 fritosxii

There were two issues here. The first being that two separate Ajax calls were being triggered by the user pressing the submit button. This broke the normal file upload, with normal referring to using the buttons to input a new file.

The second issue was that ajaxData.append('profile'... did not populate the existing profile field, but rather created a new, identical, field to populate. Deleting the existing, empty, profile field fixed this issue.

Moving to code review

suuuth avatar Jun 22 '18 14:06 suuuth

Safari does not support both form.get() as well as formData.delete()

added a check to disable drag and drop on safari

suuuth avatar Jun 22 '18 16:06 suuuth

What page should I review this on? What branch?

austintruchan avatar Jun 25 '18 15:06 austintruchan

on branch suth-35 on the edit-user page there is a drag and drop to edit profile pictures

suuuth avatar Jun 25 '18 15:06 suuuth

Huh. Unfortunately everytime I tried to go to an edit user page, it would redirect me to the the users main profile page. This only happens on this branch.

austintruchan avatar Jun 25 '18 19:06 austintruchan

fixed routing issue. Should be able to navigate to this page now

suuuth avatar Jun 26 '18 17:06 suuuth

Okay. It seems to work, but as soon as I drop something in, it automatically submits the page. It shouldn't do that.

austintruchan avatar Jun 27 '18 19:06 austintruchan

I am sad about safari though. I think that for now we should get this pushed, but should come back to safari eventually.

The file uploaders are designed to encourage drag and drop, and will definitely cause confusion for safari users for when they just don't work as expected. Safari is apparently the second most widely used browser behind chrome. So its definitely worth seeking a solution.

austintruchan avatar Jun 29 '18 20:06 austintruchan

We could implement a visual change when Safari is detected to avoid this confusion you are talking about. This would ideally be a temporary fix for until safari-drag-n-drop is figured out

suuuth avatar Jun 29 '18 21:06 suuuth

I'm going to reopen this, in the hopes that we can fix safari in the future. If thats okay.

austintruchan avatar Jul 09 '18 18:07 austintruchan

Safari drag and drop seems to work for all document/file fields, however needs to be fixed for the dragging and dropping of profile images on signup, invited signup, and edit profile pages.

austintruchan avatar Dec 03 '18 21:12 austintruchan

Also, drag and drop file fields need to be updated on all import pages as well. Import project, form, records etc.

austintruchan avatar Dec 06 '18 16:12 austintruchan