Commits

Anonymous committed 3c6de05

may fiix pb of drag and drop. not tested yet.

  • Participants
  • Parent commits bfdd803

Comments (0)

Files changed (2)

File friendpaste/settings.py

 
 if DEBUG:
     SITE_URI = 'http://localhost:5000'
-    ORBITED_HOST = '192.168.1.2'
+    ORBITED_HOST = 'localhost'
     ORBITED_PORT = 9000
  
 

File static/js/src/review.js

             tag_name=='BUTTON' ||
             tag_name=='TEXTAREA')) return;
         
-        document.querySelector("#Q").focus();
         this.isDragging = true;
 
         this.divComment.style.cursor = "move";
         var pos = this.divComment.cumulativeOffset();
        
         this.offset = [point.x - pos.x, point.y - pos.y];
+
+        var d = this.divComment.ownerDocument;
+
+        d.body.onselectstart = function(e) {
+            e.preventDefault();
+            e.stopPropagation();
+            return false;
+        }
+
+        d.ondragstart = function(e) {
+            e.preventDefault();
+            e.stopPropagation();
+            return false;
+        }
+
         e.stopPropagation(); 
         return false;
     },
 
     endDragCB: function(e) {
         this.isDragging = false;
+
         this.divComment.style.cursor = "default";
+        document.body.onselectstart = null;
+
+        document.ondragstart = null;
     },
 
     showCommentBox: function() {