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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/assets/javascripts/docs.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/content/assets/javascripts/docs.js b/content/assets/javascripts/docs.js
index 90921797..018c0bb2 100644
--- a/content/assets/javascripts/docs.js
+++ b/content/assets/javascripts/docs.js
@@ -179,6 +179,12 @@ function toggleNavigation() {
// Adds the ability to auto-scroll to the active item in the TOC
$(window).on('activate.bs.scrollspy', function() {
+ const isMobile = window.matchMedia('(max-width: 1099px)').matches;
+
+ if(isMobile) {
+ return;
+ }
+
const activeAnchors = document.querySelectorAll('#markdown-toc .nav-link.active');
if(activeAnchors.length) {