From 8e71015c8f9e4ad9f6c772b73abab210ba7a3354 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 26 Mar 2010 00:56:02 -0600 Subject: [PATCH] Fix unselecting a shift-click selection --- imp/js/DimpBase.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/imp/js/DimpBase.js b/imp/js/DimpBase.js index 1f5b2e568..d027b870c 100644 --- a/imp/js/DimpBase.js +++ b/imp/js/DimpBase.js @@ -1665,12 +1665,8 @@ var DimpBase = { id = elt.identify(), d = DragDrop.Drags.getDrag(id); - if (elt.hasClassName('vpRow')) { - if (d.selectIfNoDrag && !d.wasDragged) { - this.msgSelect(id, { right: e.memo.isRightClick() }); - } - } else if (elt.hasClassName('folder')) { - if (!d.opera && d.wasDragged) { + if (elt.hasClassName('folder')) { + if (!d.opera) { $('folderopts').show(); $('dropbase').hide(); } @@ -1681,6 +1677,17 @@ var DimpBase = { } }, + onDragMouseUp: function(e) + { + var elt = e.element(), + id = elt.identify(); + + if (elt.hasClassName('vpRow') && + DragDrop.Drags.getDrag(id).selectIfNoDrag) { + this.msgSelect(id, { right: e.memo.isRightClick() }); + } + }, + /* Keydown event handler */ keydownHandler: function(e) { @@ -3080,6 +3087,7 @@ document.observe('DragDrop2:drag', DimpBase.onDrag.bindAsEventListener(DimpBase) document.observe('DragDrop2:drop', DimpBase.folderDropHandler.bindAsEventListener(DimpBase)); document.observe('DragDrop2:end', DimpBase.onDragEnd.bindAsEventListener(DimpBase)); document.observe('DragDrop2:mousedown', DimpBase.onDragMouseDown.bindAsEventListener(DimpBase)); +document.observe('DragDrop2:mouseup', DimpBase.onDragMouseUp.bindAsEventListener(DimpBase)); /* Route AJAX responses through ViewPort. */ DimpCore.onDoActionComplete = function(r) { -- 2.11.0