From 2c521dd245f73f64deef952f98f5ced32c53e89f Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 19 Jan 2017 10:54:02 +0000 Subject: [PATCH] Clears all dropdown menus in issue sidebar when it opens --- .../javascripts/boards/components/board_sidebar.js.es6 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/boards/components/board_sidebar.js.es6 b/app/assets/javascripts/boards/components/board_sidebar.js.es6 index 2fadb4b293c..75dfcb66bb0 100644 --- a/app/assets/javascripts/boards/components/board_sidebar.js.es6 +++ b/app/assets/javascripts/boards/components/board_sidebar.js.es6 @@ -29,11 +29,13 @@ watch: { detail: { handler () { - this.issue = this.detail.issue; - - if (this.showSidebar) { - $('.js-user-search', this.$el).data('glDropdown').clearMenu(); + if (this.issue.id !== this.detail.issue.id) { + $('.js-issue-board-sidebar', this.$el).each((i, el) => { + $(el).data('glDropdown').clearMenu(); + }); } + + this.issue = this.detail.issue; }, deep: true },