From 9489adc5936fd516f3f6df91cfce3697b36e2cf1 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 02 Jun 2009 11:46:14 -0400 Subject: [PATCH] Fix list events used in drag&drop functionality (#1485890) --- program/js/list.js | 2 +- program/js/app.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 4f12e80..9cc3c1d 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -164,8 +164,8 @@ this.message_list.addEventListener('keypress', function(o){ p.msglist_keypress(o); }); this.message_list.addEventListener('select', function(o){ p.msglist_select(o); }); this.message_list.addEventListener('dragstart', function(o){ p.drag_start(o); }); - this.message_list.addEventListener('dragmove', function(o, e){ p.drag_move(e); }); - this.message_list.addEventListener('dragend', function(o, e){ p.drag_end(e); }); + this.message_list.addEventListener('dragmove', function(e){ p.drag_move(e); }); + this.message_list.addEventListener('dragend', function(e){ p.drag_end(e); }); document.onmouseup = function(e){ return p.doc_mouse_up(e); }; this.message_list.init(); @@ -280,8 +280,8 @@ this.contact_list.addEventListener('keypress', function(o){ p.contactlist_keypress(o); }); this.contact_list.addEventListener('select', function(o){ p.contactlist_select(o); }); this.contact_list.addEventListener('dragstart', function(o){ p.drag_start(o); }); - this.contact_list.addEventListener('dragmove', function(o, e){ p.drag_move(e); }); - this.contact_list.addEventListener('dragend', function(o, e){ p.drag_end(e); }); + this.contact_list.addEventListener('dragmove', function(e){ p.drag_move(e); }); + this.contact_list.addEventListener('dragend', function(e){ p.drag_end(e); }); this.contact_list.init(); if (this.env.cid) diff --git a/program/js/list.js b/program/js/list.js index 51889fa..aa34546 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -805,7 +805,7 @@ { var pos = rcube_event.get_mouse_pos(e); this.draglayer.css({ left:(pos.x+20)+'px', top:(pos.y-5 + (bw.ie ? document.documentElement.scrollTop : 0))+'px' }); - this.triggerEvent('dragmove', e); + this.triggerEvent('dragmove', e?e:window.event); } this.drag_start = false; -- Gitblit v1.9.1