Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/h5/dd-droppable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ export class DDDroppable extends DDBaseImplement implements HTMLElementExtendOpt

/** @internal called when the item is leaving our area, stop tracking if we had moving item */
private _dragLeave(event: DragEvent): void {
// Note: Safari Mac has null relatedTarget which causes #1684 so check if DragEvent is inside the grid instead
if (!event.relatedTarget) {
const { bottom, left, right, top } = this.el.getBoundingClientRect();
if (event.x < right && event.x > left && event.y < bottom && event.y > top) return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should be <=

}
if (this.el.contains(event.relatedTarget as HTMLElement)) return;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

else if (this.el.contains(event.relatedTarget as HTMLElement)) return;
no reason to check with null value.

this._removeLeaveCallbacks();
if (this.moving) {
Expand Down