Make dropzone message clickable#91
Conversation
There was a problem hiding this comment.
That shouldn't be necessary, should it?
There was a problem hiding this comment.
Oh... yes it is. I just now realised that I've never experienced those problems because I always used the substitute image.
|
Thanks for the stylus info. I fixed that as well. |
|
I went for a bit of a different approach though. I added a function if evt.target == @element or Dropzone.elementInside evt.target, @element.querySelector ".message" |
|
That makes sense (I was going for a minimal change since I'm not a CoffeeScript expert). However, that probably means you should also change the selector in basic.styl to Thanks for Dropzone by the way--really easy to use and looks great! |
In the current build of Dropzone, you can click anywhere in the drop zone to bring up the browse dialog except the "Drop files here or click" message, which is a little odd. This patch should fix that.
I wasn't able to test the patch as-is, because I couldn't build properly with grunt (stylus complained that it couldn't find nib, and the built JS file didn't seem to work). I did test basically the same patch in (a slightly older version of) the checked-in JS file and basic.css, and it worked. So, hopefully it will work for you :)