summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-04-18 03:04:32 -0400
committerAleksander Machniak <alec@alec.pl>2015-04-18 03:04:32 -0400
commit1af5595b901ae0866ad8c80dd23a4cd70ae6e585 (patch)
tree4eafe13c0dd524a22ad01aa8218124b85cd6b09c
parent224a1b19cba933ca1495a756cc3f5f23db09e956 (diff)
Fix mouseup event handling when dragging a list record (#1490359)
This fixes drag-n-drop on managesieve filters list.
-rw-r--r--program/js/list.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/js/list.js b/program/js/list.js
index 9c41a12..d5a1eb1 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -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) {