summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-03-02 09:59:07 +0000
committerPhil Hughes <me@iamphill.com>2017-03-02 15:54:27 +0000
commit0385b161de1309e60d060b0262e8a84cf071af51 (patch)
treed7760b9a24e4b097f5ef51e1687a27b009a2d2fe
parentbb062ebdb68e5d4d9a92339948ddaaa68cdcf36c (diff)
downloadgitlab-ce-tooltip-hide-on-scroll.tar.gz
Hides the tooltip on scrolltooltip-hide-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.
-rw-r--r--app/assets/javascripts/application.js4
-rw-r--r--changelogs/unreleased/tooltip-hide-on-scroll.yml4
2 files changed, 8 insertions, 0 deletions
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: