From 32ca1f9fc8a78e092565b51cc97faa724bb4e6cf Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 30 May 2009 05:09:57 -0400
Subject: [PATCH] - css fixes (#1485869)

---
 program/js/list.js |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/program/js/list.js b/program/js/list.js
index 706daab..addd1e6 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -625,6 +625,7 @@
 
   var keyCode = rcube_event.get_keycode(e);
   var mod_key = rcube_event.get_modifier(e);
+
   switch (keyCode)
   {
     case 40:
@@ -653,6 +654,9 @@
 {
   switch (rcube_event.get_keycode(e))
   {
+    case 27:
+      if (this.drag_active)
+	this.drag_mouse_up(e);
     case 40:
     case 38: 
     case 63233:
@@ -723,7 +727,7 @@
   
     if (!this.draglayer)
       this.draglayer = $('<div>').attr('id', 'rcmdraglayer').css({ position:'absolute', display:'none', 'z-index':2000 }).appendTo(document.body);
-  
+
     // get subjects of selectedd messages
     var names = '';
     var c, i, node, subject, obj;
@@ -747,9 +751,12 @@
             if (((node = obj.childNodes[i].firstChild) && (node.nodeType==3 || node.nodeName=='A')) &&
               (this.subject_col < 0 || (this.subject_col >= 0 && this.subject_col == c)))
             {
-              if (n == 0)
-                this.drag_start_pos = $(node).offset();
-              
+	      if (n == 0) {
+	        if (node.nodeType == 3)
+		  this.drag_start_pos = $(obj.childNodes[i]).offset();
+		else
+                  this.drag_start_pos = $(node).offset();
+	      }
               subject = node.nodeType==3 ? node.data : node.innerHTML;
 	      // remove leading spaces
 	      subject = subject.replace(/^\s+/i, '');

--
Gitblit v1.9.1