@@ -472,8 +472,8 @@ module.exports = React.createClass({
472472
473473 componentWillUnmount : function ( ) {
474474 // 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 ) ;
477477 removeUserSelectStyles ( this ) ;
478478 } ,
479479
@@ -541,8 +541,8 @@ module.exports = React.createClass({
541541
542542
543543 // 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 ) ;
546546 } ,
547547
548548 handleDragEnd : function ( e ) {
@@ -562,8 +562,8 @@ module.exports = React.createClass({
562562 this . props . onStop ( e , createUIEvent ( this ) ) ;
563563
564564 // 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 ) ;
567567 } ,
568568
569569 handleDrag : function ( e ) {
0 commit comments