Skip to content
This repository has been archived by the owner on Jun 18, 2018. It is now read-only.

Removed Firefox specific mousemove event listener #34

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 0 additions & 10 deletions src/HTML5Backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,23 +181,13 @@ export default class HTML5Backend {
this.currentNativeSource = new SourceType();
this.currentNativeHandle = this.registry.addSource(type, this.currentNativeSource);
this.actions.beginDrag([this.currentNativeHandle]);

// On Firefox, if mousemove fires, the drag is over but browser failed to tell us.
// This is not true for other browsers.
if (isFirefox()) {
this.window.addEventListener('mousemove', this.endDragNativeItem, true);
}
}

endDragNativeItem() {
if (!this.isDraggingNativeItem()) {
return;
}

if (isFirefox()) {
this.window.removeEventListener('mousemove', this.endDragNativeItem, true);
}

this.actions.endDrag();
this.registry.removeSource(this.currentNativeHandle);
this.currentNativeHandle = null;
Expand Down