Determine if browser is drag-and-drop capable?

后端 未结 5 588
礼貌的吻别
礼貌的吻别 2021-01-03 00:43

I\'m implementing jQuery File Upload and trying to figure out the best way to detect whether the client can support drag & drop so I can render something like \'Drag &am

5条回答
  •  青春惊慌失措
    2021-01-03 01:12

    Its a bit trickier. iOS7 reports that it supports both FileReader and draganddrop pictures uploading. Since I was looking for a more general file upload that I couldn't do with iOS, I needed another answer.

    Modernizr issue 57 at heretalks about the issue. Now with windows 8 allowing both touch and mouse, its tricky. There's code in the middle by chriskeeble that I used successfully. It relies on Modernizr and agent detection.

提交回复
热议问题