Skip to content

Commit 2b05924

Browse files
b-cooperzyzo
authored andcommitted
revert: Rever 'Prevent click event after item has been dragged' from #7 (#23)
1 parent f22e635 commit 2b05924

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/MouseBackend.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ export default class MouseBackend {
5353
this.handleWindowMoveCapture.bind(this)
5454
this.handleWindowMoveEndCapture =
5555
this.handleWindowMoveEndCapture.bind(this)
56-
this.handleWindowClick =
57-
this.handleWindowClick.bind(this)
5856
this.handleWindowDragstart =
5957
this.handleWindowDragstart.bind(this)
6058
}
@@ -77,8 +75,6 @@ export default class MouseBackend {
7775
this.handleWindowMoveCapture, true)
7876
window.addEventListener('mouseup',
7977
this.handleWindowMoveEndCapture, true)
80-
window.addEventListener('click',
81-
this.handleWindowClick, true)
8278
window.addEventListener('dragstart',
8379
this.handleWindowDragstart, true)
8480
}
@@ -103,8 +99,6 @@ export default class MouseBackend {
10399
'mousemove', this.handleWindowMoveCapture, true)
104100
window.removeEventListener(
105101
'mouseup', this.handleWindowMoveEndCapture, true)
106-
window.removeEventListener(
107-
'click', this.handleWindowClick, true)
108102
window.removeEventListener(
109103
'dragstart', this.handleWindowDragstart, true)
110104
}
@@ -208,7 +202,6 @@ export default class MouseBackend {
208202
this.moveStartSourceIds = null
209203
return
210204
}
211-
this.preventClick = true
212205

213206
e.preventDefault()
214207

@@ -219,11 +212,6 @@ export default class MouseBackend {
219212
this.actions.endDrag()
220213
}
221214

222-
handleWindowClick(e) {
223-
if (this.preventClick) e.stopPropagation()
224-
this.preventClick = false
225-
}
226-
227215
// Disable drag on images (Firefox)
228216
handleWindowDragstart(e) {
229217
e.preventDefault()

0 commit comments

Comments
 (0)