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

bug(tdFileDrop): no way to remove .drop-zone flag #109

Closed
quanterion opened this issue Oct 18, 2016 · 2 comments
Closed

bug(tdFileDrop): no way to remove .drop-zone flag #109

quanterion opened this issue Oct 18, 2016 · 2 comments
Assignees
Labels
Milestone

Comments

@quanterion
Copy link
Contributor

tdFileDrop directive adds .drop-zone class on (dragenter). And I expect .drop-zone class to be removed after user released mouse button and (fileDrop) event emitted. However It doesn't happen and I can't find a way to do it manually.

@emoralesb05
Copy link
Contributor

Hey @quanterion,
Can you provide more info on the example? Since its supposed to remove it on dragleave, although the ripple in the button might affect it since we have a target validation (which we might need to remove because of the ripple background).

@emoralesb05
Copy link
Contributor

emoralesb05 commented Oct 18, 2016

oh! nvm, just replicated it haha we never noticed cause we use it inside the td-file-upload component.

Edit: A workaround would be to create a small directive that has this in it

@HostListener('drop', ['$event'])
  onDrop(event: Event): void {
    this._renderer.setElementClass(this._element.nativeElement, 'drop-zone', false);
  }

So it removes the class on drop event.

This will be fixed ASAP though. Thanks for the heads up!

@emoralesb05 emoralesb05 self-assigned this Oct 18, 2016
@emoralesb05 emoralesb05 added this to the Alpha 0.9 milestone Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants