@@ -472,8 +472,8 @@ module.exports = React.createClass({
472
472
473
473
componentWillUnmount : function ( ) {
474
474
// Remove any leftover event handlers
475
- removeEvent ( window , dragEventFor [ 'move' ] , this . handleDrag ) ;
476
- removeEvent ( window , dragEventFor [ 'end' ] , this . handleDragEnd ) ;
475
+ removeEvent ( document , dragEventFor [ 'move' ] , this . handleDrag ) ;
476
+ removeEvent ( document , dragEventFor [ 'end' ] , this . handleDragEnd ) ;
477
477
removeUserSelectStyles ( this ) ;
478
478
} ,
479
479
@@ -541,8 +541,8 @@ module.exports = React.createClass({
541
541
542
542
543
543
// Add event handlers
544
- addEvent ( window , dragEventFor [ 'move' ] , this . handleDrag ) ;
545
- addEvent ( window , dragEventFor [ 'end' ] , this . handleDragEnd ) ;
544
+ addEvent ( document , dragEventFor [ 'move' ] , this . handleDrag ) ;
545
+ addEvent ( document , dragEventFor [ 'end' ] , this . handleDragEnd ) ;
546
546
} ,
547
547
548
548
handleDragEnd : function ( e ) {
@@ -562,8 +562,8 @@ module.exports = React.createClass({
562
562
this . props . onStop ( e , createUIEvent ( this ) ) ;
563
563
564
564
// Remove event handlers
565
- removeEvent ( window , dragEventFor [ 'move' ] , this . handleDrag ) ;
566
- removeEvent ( window , dragEventFor [ 'end' ] , this . handleDragEnd ) ;
565
+ removeEvent ( document , dragEventFor [ 'move' ] , this . handleDrag ) ;
566
+ removeEvent ( document , dragEventFor [ 'end' ] , this . handleDragEnd ) ;
567
567
} ,
568
568
569
569
handleDrag : function ( e ) {
0 commit comments