From 0385b161de1309e60d060b0262e8a84cf071af51 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 2 Mar 2017 09:59:07 +0000 Subject: Hides the tooltip on scroll This is especially obvious on mobile. The tooltip opens on tap but there is no way to hide it, so this hides the tooltip after scrolling. --- app/assets/javascripts/application.js | 4 ++++ changelogs/unreleased/tooltip-hide-on-scroll.yml | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 changelogs/unreleased/tooltip-hide-on-scroll.yml diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index c51860d1604..7041206305b 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -236,6 +236,10 @@ require('es6-promise').polyfill(); var bootstrapBreakpoint = bp.getBreakpointSize(); var fitSidebarForSize; + $(document).on('scroll', function() { + $('.has-tooltip').tooltip('hide'); + }); + // Set the default path for all cookies to GitLab's root directory Cookies.defaults.path = gon.relative_url_root || '/'; diff --git a/changelogs/unreleased/tooltip-hide-on-scroll.yml b/changelogs/unreleased/tooltip-hide-on-scroll.yml new file mode 100644 index 00000000000..cd81d303330 --- /dev/null +++ b/changelogs/unreleased/tooltip-hide-on-scroll.yml @@ -0,0 +1,4 @@ +--- +title: Fixed tooltip remaining after scrolling the page +merge_request: +author: -- cgit v1.2.1