]> _ Git - fluidbook-html5.git/commitdiff
wip #7617 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Jun 2025 14:12:17 +0000 (16:12 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 27 Jun 2025 14:12:17 +0000 (16:12 +0200)
js/libs/fluidbook/fluidbook.resize.js

index f38ccd849122b2557f8798f1a5dea002d2926947..6ed1a9a89b68471b0ba2500c2144dd2ce305b598 100644 (file)
@@ -440,7 +440,7 @@ FluidbookResize.prototype = {
     },
 
     checkSliderVisibility: function () {
-        if (this.reduceVerticalMargins() && this.fluidbook.settings.mobileHideSliderIfOverlaps && ($("#slider").get(0).getBoundingClientRect().top - $("#fluidbook").get(0).getBoundingClientRect().bottom < 5)) {
+        if (this.reduceVerticalMargins() && this.fluidbook.settings.mobileHideSliderIfOverlaps && ($("#slider").length > 0 && ($("#slider").get(0).getBoundingClientRect().top - $("#fluidbook").get(0).getBoundingClientRect().bottom < 5))) {
             $('body').addClass('slider-hidden');
         } else {
             $('body').removeClass('slider-hidden');