From: Michael M Slusarz Date: Fri, 26 Mar 2010 06:56:02 +0000 (-0600) Subject: Fix unselecting a shift-click selection X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8e71015c8f9e4ad9f6c772b73abab210ba7a3354;p=horde.git Fix unselecting a shift-click selection --- 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) {