summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/droplab
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-08-22 13:48:29 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-08-29 09:35:58 +0800
commit88cf7591c7bc38b7dbd70085ea3b93813acc14f8 (patch)
tree42b20d0039cbda92de6f71caa4b08ed162e5170d /app/assets/javascripts/droplab
parentb34120336d33e57d9817559f82771f8da4f5f2b3 (diff)
downloadgitlab-ce-88cf7591c7bc38b7dbd70085ea3b93813acc14f8.tar.gz
Fix dropdown closing when mouseup is outsidefix-dropdown-closing
Changes the document event listener to listen to mousedown instead of click
Diffstat (limited to 'app/assets/javascripts/droplab')
-rw-r--r--app/assets/javascripts/droplab/drop_lab.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/droplab/drop_lab.js b/app/assets/javascripts/droplab/drop_lab.js
index 1339e28d8b8..33c05404493 100644
--- a/app/assets/javascripts/droplab/drop_lab.js
+++ b/app/assets/javascripts/droplab/drop_lab.js
@@ -60,7 +60,7 @@ class DropLab {
addEvents() {
this.eventWrapper.documentClicked = this.documentClicked.bind(this);
- document.addEventListener('click', this.eventWrapper.documentClicked);
+ document.addEventListener('mousedown', this.eventWrapper.documentClicked);
}
documentClicked(e) {
@@ -74,7 +74,7 @@ class DropLab {
}
removeEvents() {
- document.removeEventListener('click', this.eventWrapper.documentClicked);
+ document.removeEventListener('mousedown', this.eventWrapper.documentClicked);
}
changeHookList(trigger, list, plugins, config) {