From fb4dee735782c2761f168abf888ac14793a4e486 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 10 Feb 2017 02:19:20 +0100 Subject: [PATCH] =?UTF-8?q?Improved=20error=20handling.=20Need=20to=20set?= =?UTF-8?q?=20=E2=80=9Cpointer-events:=20none=E2=80=9D=20on=20.main=20for?= =?UTF-8?q?=20firefox=20(focus/select=20issue=20with=20user/groups=20and?= =?UTF-8?q?=20popovers=20in=20.main).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascripts/app/controllers/ticket_overview.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 116a9021c..96812343c 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -18,6 +18,7 @@ class App.TicketOverview extends App.Controller '.js-batch-assign-group-name': 'batchAssignGroupName' '.js-batch-assign-group-inner': 'batchAssignGroupInner' '.js-batch-macro': 'batchMacro' + '.main': 'mainContent' events: 'mousedown .item': 'startDragItem' @@ -48,6 +49,8 @@ class App.TicketOverview extends App.Controller $(document).on 'mousemove.item', @dragItem $(document).one 'mouseup.item', @endDragItem + + @mainContent.addClass('u-unclickable') # TODO: fire @cancelDrag on ESC dragItem: (event) => @@ -104,6 +107,7 @@ class App.TicketOverview extends App.Controller endDragItem: (event) => return if !@batchSupport + @mainContent.removeClass('u-unclickable') $(document).off 'mousemove.item' $(document).off 'mouseup.item' pos = @batchDragger.data() @@ -403,7 +407,9 @@ class App.TicketOverview extends App.Controller group = App.Group.find(groupId) users = [] - users.push App.User.find(i) for i in group.user_ids + for user_id in group.user_ids + if App.User.exists(user_id) + users.push App.User.find(user_id) @batchAssignGroupName.text group.displayName() @batchAssignGroupInner.html $(App.view('ticket_overview/batch_overlay_user_group')(