noeldelgado / gemini-scrollbar

:first_quarter_moon: Custom overlay-scrollbars with native scrolling mechanism for web applications
https://noeldelgado.github.io/gemini-scrollbar/
MIT License
429 stars 63 forks source link

bug(compatibility): gemini-scrollbar + FancyBox #65

Open Kristinita opened 5 years ago

Kristinita commented 5 years ago

At first, I post this issue for FancyBox issue tracker, but FancyBox owner closed issue without solve.

1. Summary

I click to image → make some actions in FancyBox menu (run slideshow for example):

    page scroll to top.

I have this behavior for Gemini scrollbar and no reproduce for native browser scrollbars.

I don't reproduce a bug for browsers native scrollbar.

2. Environment

2.1. Scripts

2.2. Tested browsers

I reproduce the problems in browsers versions without addons and users settings:

2.3. Screencast writing

I post this information, because I have strange behavior.

If I record GIF:

    problem not reproduced. I can record GIF from about tenth attempt.

Else:

    problem reproduced quickly, almost immediately after the start of the FancyBox slideshow.

3. MCVE

(Yes, it minimal example)

4. Steps to reproduce

I open my demo page → I scroll page to any image → I run FancyBox slideshow.

5. Expected behavior

If default scrollbar:

    no scrolling to top of page.

See examples here and here.

6. Non-expected behavior

Else Gemini scrollbar:

    scrolling to page top. See GIF from MCVE for example.

7. Not helped

I read many similar questions → try solutions from answers and comments → no effect.

  1. $.fancybox.defaults.hideScrollbar = false; as @fancyapps say
  2. $.fancybox.defaults.autoFocus = false; as @fancyapps say
  3. Dave Kiss most popular Stack Overflow answer
  4. @sohel-ahmed-ansari variant
  5. @theexpand and @hsobhy variants
  6. @Joeran answer. I try modified it to Gemini methods → also no effect.

    $('.KiraNotLazy').fancybox({
     beforeLoad: function(){
      internals.scrollbar.destroy();
        },
     afterClose: function(){
       internals.scrollbar.update();
      }
    });

Thanks.