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
This commit is contained in:
Fatih Acet 2019-07-04 13:08:38 +00:00
commit bae437254d

View file

@ -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