summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2019-07-04 13:08:38 +0000
committerFatih Acet <acetfatih@gmail.com>2019-07-04 13:08:38 +0000
commitbae437254d7d35a63ceab8e7f980fb1b30933436 (patch)
tree84c3cc9337250599ded514d62e710a512e9e58a1
parent56af0bfd9e4f1895d2060e1fcb9c0885d1f3b024 (diff)
parent36e73eff4e6a56ff7e3b1c078f42ae664754eaa7 (diff)
downloadgitlab-ce-bae437254d7d35a63ceab8e7f980fb1b30933436.tar.gz
Merge branch 'nfriend-make-haml-tooltip-delay-user-configurable' into 'master'
Allow vanilla JS tooltip delay to be customized through localStorage See merge request gitlab-org/gitlab-ce!30196
-rw-r--r--app/assets/javascripts/main.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 9f30a989295..2d32e6a7fbb 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -119,11 +119,15 @@ function deferredInitialisation() {
.catch(() => {});
}
+ const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
+ const delay = glTooltipDelay ? JSON.parse(glTooltipDelay) : 0;
+
// Initialize tooltips
$body.tooltip({
selector: '.has-tooltip, [data-toggle="tooltip"]',
trigger: 'hover',
boundary: 'viewport',
+ delay,
});
// Initialize popovers