@@ -46,6 +46,8 @@ export default class MouseBackend {
46
46
this . handleWindowMoveEndCapture . bind ( this )
47
47
this . handleWindowClick =
48
48
this . handleWindowClick . bind ( this )
49
+ this . handleWindowDragstart =
50
+ this . handleWindowDragstart . bind ( this )
49
51
}
50
52
51
53
setup ( ) {
@@ -68,6 +70,8 @@ export default class MouseBackend {
68
70
this . handleWindowMoveEndCapture , true )
69
71
window . addEventListener ( 'click' ,
70
72
this . handleWindowClick , true )
73
+ window . addEventListener ( 'dragstart' ,
74
+ this . handleWindowDragstart , true )
71
75
}
72
76
73
77
getSourceClientOffset ( sourceId ) {
@@ -92,6 +96,8 @@ export default class MouseBackend {
92
96
'mouseup' , this . handleWindowMoveEndCapture , true )
93
97
window . removeEventListener (
94
98
'click' , this . handleWindowClick , true )
99
+ window . removeEventListener (
100
+ 'dragstart' , this . handleWindowDragstart , true )
95
101
}
96
102
97
103
connectDragSource ( sourceId , node ) {
@@ -209,6 +215,11 @@ export default class MouseBackend {
209
215
this . preventClick = false
210
216
}
211
217
218
+ // Disable drag on images (Firefox)
219
+ handleWindowDragstart ( e ) {
220
+ e . preventDefault ( )
221
+ }
222
+
212
223
installSourceNodeRemovalObserver ( node ) {
213
224
this . uninstallSourceNodeRemovalObserver ( )
214
225
0 commit comments