Skip to content

Commit

Permalink
Fixed #14512
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Feb 1, 2024
1 parent 3373c50 commit ed795b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/components/dragdrop/dragdrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,10 @@ export class Droppable implements AfterViewInit, OnDestroy {
dragLeave(event: DragEvent) {
event.preventDefault();

DomHandler.removeClass(this.el.nativeElement, 'p-draggable-enter');
this.onDragLeave.emit(event);
if (!this.el.nativeElement.contains(event.relatedTarget)) {
DomHandler.removeClass(this.el.nativeElement, 'p-draggable-enter');
this.onDragLeave.emit(event);
}
}

allowDrop(event: DragEvent): boolean {
Expand Down

0 comments on commit ed795b7

Please sign in to comment.