reppners / ngx-drag-drop

Angular directives using the native HTML Drag And Drop API
https://reppners.github.io/ngx-drag-drop/
BSD 3-Clause "New" or "Revised" License
299 stars 118 forks source link

dndDragoverClass works inconsistently #76

Closed JanvanCasteren closed 4 years ago

JanvanCasteren commented 4 years ago

In notice that the dragover class is not always removed when the mouse is moving out of the dropzone. This behaviour is inconsistent. When I repeat dragging over the dropzone sometimes the class is correctly removed and sometimes not. I don't really see a pattern.

Could this be a bug, or must it be something that incorrect in my code?

dragover2

JanvanCasteren commented 4 years ago

the code is like this:

<div class="dropzone" *ngIf="showDropzone"
         dndDropzone
         dndDragoverClass="dragover"
         (dndDrop)="onDrop($event)"
    ></div>

with css

.dropzone {
    border: 1px solid $primary-color;

    &.dragover {
      background-color: rgba($primary-color, 0.5);
    }
  }
Langstra commented 4 years ago

What did you do to fix this issue?