gemini-scrollbar icon indicating copy to clipboard operation
gemini-scrollbar copied to clipboard

[Question] Smooth scrolling, when clicking an anchor link

Open Kristinita opened this issue 6 years ago • 3 comments

1. Briefly

I don't understand, how I can use smooth scrolling, when I click an anchor link, if I use Gemini scrollbar.

2. Expected behavior

If I use code from this answer:

Source on Codepen — https://codepen.io/Kristinita/pen/NvqBPV.

Demonstration:

Without Gemini

3. Actual behavior

Source — https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/Scrollbar/Gemini-smooth.html.

Demonstration:

With Gemini

I get an error in Firefox native console:

TypeError: el is null

TypeError

4. Did not help

  1. I read the documentation of Gemini-Scrollbar,
  2. I use search in Google and issues of this repository.

Thanks.

Kristinita avatar Jul 27 '17 08:07 Kristinita

Hi @Kristinita, does this work for you https://jsfiddle.net/05efmw1f/?

BTW, there is a similar issues regarding mixing gemini + jquery + smooth-scrolling (https://github.com/noeldelgado/gemini-scrollbar/issues/28).

Important bits:

  • new GeminiScrollbar({ element: document.body ...
  • $( scrollbar.getViewElement() ).animate
  • html { height: 100vh }

If that works for you, how do you think the documentation can be improved?

noeldelgado avatar Jul 27 '17 13:07 noeldelgado

@Kristinita, can this be closed?

noeldelgado avatar Aug 02 '17 01:08 noeldelgado

@noeldelgado , see issue. I don't understand, how I can solve the problem.

Thanks.

Kristinita avatar Aug 02 '17 04:08 Kristinita