]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/js/list.js.src
Imported Upstream version 0.5.3+dfsg
[roundcube.git] / program / js / list.js.src
index 78cf994a8c5c4dc45686aa6c43dd4f47e55ad48b..27daf32cb736fe99d0cec36ff3899c656e684383 100644 (file)
@@ -13,7 +13,7 @@
  | Requires: common.js                                                   |
  +-----------------------------------------------------------------------+
 
-  $Id: list.js 4666 2011-04-17 09:34:02Z alec $
+  $Id: list.js 4763 2011-05-13 17:31:09Z alec $
 */
 
 
@@ -101,7 +101,7 @@ init: function()
 init_row: function(row)
 {
   // make references in internal array and set event handlers
-  if (row && String(row.id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i)) {
+  if (row && String(row.id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)) {
     var self = this,
       uid = RegExp.$1;
     row.uid = uid;
@@ -601,7 +601,7 @@ get_first_row: function()
     var i, len, rows = this.list.tBodies[0].rows;
 
     for (i=0, len=rows.length-1; i<len; i++)
-      if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null)
+      if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null)
            return RegExp.$1;
   }
 
@@ -614,7 +614,7 @@ get_last_row: function()
     var i, rows = this.list.tBodies[0].rows;
 
     for (i=rows.length-1; i>=0; i--)
-      if (rows[i].id && String(rows[i].id).match(/rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null)
+      if (rows[i].id && String(rows[i].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i) && this.rows[RegExp.$1] != null)
         return RegExp.$1;
   }
 
@@ -988,6 +988,8 @@ key_press: function(e)
       this.shiftkey = e.shiftKey;
       this.key_pressed = keyCode;
       this.triggerEvent('keypress');
+      // reset shiftkey flag, we need it only for registered events
+      this.shiftkey = false;
 
       if (this.key_pressed == this.BACKSPACE_KEY)
         return rcube_event.cancel(e);