Navigation Menu

Skip to content

Commit

Permalink
Fix mouseup event handling when dragging a list record (#1490359)
Browse files Browse the repository at this point in the history
This fixes drag-n-drop on managesieve filters list.
  • Loading branch information
alecpl committed Apr 18, 2015
1 parent 224a1b1 commit 1af5595
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion program/js/list.js
Expand Up @@ -152,7 +152,12 @@ init_row: function(row)

// set eventhandlers to table row (only left-button-clicks in mouseup)
$(row).mousedown(function(e) { return self.drag_row(e, this.uid); })
.mouseup(function(e) { if (e.which == 1) return self.click_row(e, this.uid); });
.mouseup(function(e) {
if (e.which == 1 && !self.drag_active)
return self.click_row(e, this.uid);
else
return true;
});

if (bw.touch && row.addEventListener) {
row.addEventListener('touchstart', function(e) {
Expand Down

0 comments on commit 1af5595

Please sign in to comment.