Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-08-22 08:48:29 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-08-29 04:35:58 +0300
commit88cf7591c7bc38b7dbd70085ea3b93813acc14f8 (patch)
tree42b20d0039cbda92de6f71caa4b08ed162e5170d /app/assets/javascripts/droplab
parentb34120336d33e57d9817559f82771f8da4f5f2b3 (diff)
Fix dropdown closing when mouseup is outside
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) {