dropzone / dropzone

Dropzone is an easy to use drag'n'drop library. It supports image previews and shows nice progress bars.
http://www.dropzone.dev/js
Other
18.07k stars 3.29k forks source link

fastclick.js disables click-event #985

Closed Brennwert closed 3 years ago

Brennwert commented 9 years ago

Hi,

Probably not a problem inside dropzone, but after tearing some of my hair out I wanted to leave the info somewhere: If you include fastclick.js (https://github.com/ftlabs/fastclick) in a page together with dropzone, the file-picker won't open on Android devices. The click-event is just dead.

BR Markus

jeepmac commented 9 years ago

Same issue here, on Android 4.4 Wechat App. Thanks Markus's hair...

pollingj commented 9 years ago

@Brennwert just wondering what you did to fix the issue? Did you add in a needsclick?

Brennwert commented 9 years ago

@pollingj: Lazy ass me just removed fastclick in the upload-sections.

pollingj commented 8 years ago

In case anyone is interested, I believe I've resolved this issue (not fully tested on all mobile devices yet). The required steps.

  1. Get Dropzone instantiated $('...').dropzone
  2. Find all the spans inside and set the needsclick class. e.g.
$('...').find('span').each(function() {
  $(this).addClass('needsclick');
})