Skip to content

Make dropzone message clickable#91

Merged
enyo merged 1 commit intodropzone:developfrom
njx:click-message
Apr 5, 2013
Merged

Make dropzone message clickable#91
enyo merged 1 commit intodropzone:developfrom
njx:click-message

Conversation

@njx
Copy link
Copy Markdown

@njx njx commented Apr 5, 2013

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 :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That shouldn't be necessary, should it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... yes it is. I just now realised that I've never experienced those problems because I always used the substitute image.

enyo added a commit that referenced this pull request Apr 5, 2013
Make dropzone message clickable
@enyo enyo merged commit 9a7e708 into dropzone:develop Apr 5, 2013
enyo added a commit that referenced this pull request Apr 5, 2013
@enyo
Copy link
Copy Markdown
Collaborator

enyo commented Apr 5, 2013

Thanks for the stylus info. I fixed that as well.

@enyo
Copy link
Copy Markdown
Collaborator

enyo commented Apr 5, 2013

I went for a bit of a different approach though. I added a function Dropzone.elementInside() so that any child element passes now. The line looks like this now:

if evt.target == @element or Dropzone.elementInside evt.target, @element.querySelector ".message"

@njx njx deleted the click-message branch April 5, 2013 14:32
@njx
Copy link
Copy Markdown
Author

njx commented Apr 5, 2013

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 .message, .message * instead of just .message, .message span (I didn't see that in your followup commit).

Thanks for Dropzone by the way--really easy to use and looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants