소스 검색

FIX: After starting Drag, remove mouseup listening from document.

danielballan 8 년 전
부모
커밋
9a15824266
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/filebrowser/listing.ts

+ 3 - 2
src/filebrowser/listing.ts

@@ -1006,12 +1006,13 @@ class DirListing extends Widget {
       });
     }
 
-    // Start the drag and remove the mousemove listener.
+    // Start the drag and remove the mousemove and mouseup listeners.
+    document.removeEventListener('mousemove', this, true);
+    document.removeEventListener('mouseup', this, true);
     this._drag.start(clientX, clientY).then(action => {
       this._drag = null;
       clearTimeout(this._selectTimer);
     });
-    document.removeEventListener('mousemove', this, true);
   }
 
   /**