1

I created a form on a website that allows users to upload files. Users can also drag and drop files onto this form. However, on some devices, it is simply not possible to drag and drop files (e.g. on my iPhone). So I only want to display the text "Drag and drop files here" only on devices on which it makes sense.

Is there a way to detect whether the device supports drag and drop files in principle? A workaround could be to detect if a mouse pointer is moving. In this case, I would guess it is possible to drag and drop files. However, it would only be a guess.

Is there a more suitable way to detect this? Please note that I don't want to detect if the browser supports drag and drop in general, but if the browser supports drag and drop files.

jonrsharpe
  • 99,167
  • 19
  • 183
  • 334
user1030151
  • 177
  • 8
  • 3
    Please note when questions are duplicates you should edit to clarify (not just a "banner" of meta content) rather than re-posting. – jonrsharpe Dec 17 '20 at 15:36
  • Okay, thank you. It's hard to understand what I should do when there is only a hint that my question is closed and that it is already answered, even it was definitly not. I thought my question was clear enough, because my last sentence explicitly says that I'm not looking for general drag and drop support. I don't understand how I can be more clear. I do not understand why I am pointed to an answer that I am specifically not looking for. And I saw no way to ask anyone and there was no description what I should do. That feels not nice. – user1030151 Dec 17 '20 at 16:14
  • However, so you mean I should edit my old question, right? And I should edit it in a way that it's even more clear what I mean, right? – user1030151 Dec 17 '20 at 16:14
  • Yes, indeed it's now been reopened. If you have further queries, you can always see [meta]. – jonrsharpe Dec 17 '20 at 16:24
  • 1
    Thank you very much for your helpful answer. It is good to know that there is a platform for such cases. I'll keep this in mind. Thank you again and have a great time. – user1030151 Dec 17 '20 at 20:35

0 Answers0