From 5f84c4e240a87b8e40a3391501d93022c3258b75 Mon Sep 17 00:00:00 2001
From: Phil Hughes <me@iamphill.com>
Date: Wed, 5 Oct 2016 16:22:36 +0100
Subject: [PATCH] Hides sidebar when clicking same issue

---
 app/assets/javascripts/boards/components/board_card.js.es6 | 7 ++++++-
 .../boards/mixins/sortable_default_options.js.es6          | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/assets/javascripts/boards/components/board_card.js.es6 b/app/assets/javascripts/boards/components/board_card.js.es6
index 17bcbc1d54f..27c78e7f02e 100644
--- a/app/assets/javascripts/boards/components/board_card.js.es6
+++ b/app/assets/javascripts/boards/components/board_card.js.es6
@@ -64,7 +64,12 @@
       showIssue () {
         if (this.showDetail) {
           this.showDetail = false;
-          Vue.set(Store.detail, 'issue', this.issue);
+
+          if (Store.detail.issue && Store.detail.issue.id === this.issue.id) {
+            Store.detail.issue = {};
+          } else {
+            Store.detail.issue = this.issue;
+          }
         }
       }
     }
diff --git a/app/assets/javascripts/boards/mixins/sortable_default_options.js.es6 b/app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
index f629d45c587..bd9ba7d5118 100644
--- a/app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
+++ b/app/assets/javascripts/boards/mixins/sortable_default_options.js.es6
@@ -22,7 +22,7 @@
       fallbackOnBody: true,
       ghostClass: 'is-ghost',
       filter: '.has-tooltip, .btn',
-      delay: gl.issueBoards.touchEnabled ? 100 : 0,
+      delay: gl.issueBoards.touchEnabled ? 100 : 50,
       scrollSensitivity: gl.issueBoards.touchEnabled ? 60 : 100,
       scrollSpeed: 20,
       onStart: gl.issueBoards.onStart,
-- 
GitLab