Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragover class is not set correctly #264

Closed
lattmann opened this issue Jul 11, 2014 · 4 comments
Closed

Dragover class is not set correctly #264

lattmann opened this issue Jul 11, 2014 · 4 comments

Comments

@lattmann
Copy link

Reproduce

  1. Have different class for drag success and error
  2. Drag and drop 'text' to the drop zone - shows dragover error as expected
  3. Leave the drop zone - removes dragover error as expected
  4. Drag and drop a file to the drop zone - shows dragover error - expected is dragover success

Suggested fix

One of the following:

  1. By commenting out https://github.com/danialfarid/angular-file-upload/blob/master/dist/angular-file-upload.js#L195 the issue is fixed.
  2. elem[0].__drag_over_class_ has to be computed/updated first before adding the class.
@danialfarid
Copy link
Owner

What browser? The demo works fine in Chrome.
It could be the logic that you have to return error or success class.

@lattmann
Copy link
Author

I have checked out your repo and ran only index.html in a browser.

Mac OS X
Safari - does not show the error class if a text is dropped, i.e. the border becomes blue.
Google Chrome Version 38.0.2089.0 canary (64-bit) - shows error class for the first hover correctly then you try to drop a file and remains red instead of changing the border blue.

Hope this helps.

@danialfarid
Copy link
Owner

That was a bug it is fixed in 1.5.1.
It only works on Chrome, other browsers do not provide the information about the dragged over content until it is dropped.

@lattmann
Copy link
Author

Thanks a lot, Danial. This is a cool library.

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

No branches or pull requests

2 participants