Open Kristinita opened 7 years ago
@noeldelgado , ping.
Can you see Stack Overflow question about gemini-scrollbar, when you will have a free time?
Thanks.
@Kristinita, I made a demo trying to answer your question on SO (I don't have a SO account 😟): demo: https://codepen.io/noeldelgado/pen/1a5c2193f5f40164f354f17bab24ecbd/
4) override gm-scroll-view's transform value, that will allow fixed position to work: Reason explained on this answer
.gm-scrollbar-container .gm-scroll-view {
transform: initial;
}
6.2) I will suggest listening to orientationchange
and update the scroll position when the event fires. This piece of code is on demo as well:
window.onorientationchange = function() {
var hash = location.hash;
if (hash) {
var top = document.getElementById(hash.replace('#', '')).offsetTop;
scrollingElement.scrollTo(0, top);
}
};
Hope that helps.
@noeldelgado ,
main
element successful works for me.I fork your pen — https://codepen.io/Kristinita/pen/JLWgvz → I made 1 change: I move <h2 id="relevance">Relevance</h2>
in end of article.
I open https://s.codepen.io/Kristinita/debug/JLWgvz/nqMwveZBVOvk#relevance page → I force refresh cache.
Scrollbar in relevance
section:
Scrollbar in begin of page:
Latest browser versions at the time.
Thanks.
Sorry, I cannot check the debug mode, it says "This debug view expired". However I can see it's working on your fork, so, dunno.
@noeldelgado ,
Sorry, I cannot check the debug mode, it says "This debug view expired".
Your pen author is Captain Anonymous → you not logged on Codepen. Debug mode works only for logged users. It free.
Thanks.
Since gemini will move all nodes into a different element the initial scroll position will be lost. A workaround is to call the logic to scroll to the anchor after initializing the gemini instance.
fork: https://codepen.io/noeldelgado/pen/1a5c2193f5f40164f354f17bab24ecbd/ debug mode: https://s.codepen.io/noeldelgado/debug/1a5c2193f5f40164f354f17bab24ecbd#relevance
@noeldelgado, thanks, it works!
3 problems:
eslint output:
6:28 error 'GeminiScrollbar' is not defined no-undef
✖ 1 problem (1 error, 0 warnings)
I can't find, how I can disable this error. my .eslintrc.yml
file:
env:
browser: true
es6: true
jquery: true
extends: 'eslint:recommended'
parserOptions:
ecmaVersion: 9
sourceType: script
ecmaFeatures:
jsx: true
See #59.
Maybe, would be better move your changes by default, to index.js
, that user configuration file will be more simple?
Thanks.
@noeldelgado , I add answer to Stack Overflow. If you want add your own answer, I can delete my at any point in time.
Thanks.
1. Summary
If Gemini Scrollbar enable for me, I get warning message in Firefox built-in console.
2. Steps to reproduce
I open official demonstration page — http://noeldelgado.github.io/gemini-scrollbar/ → I open Firefox console.
3. Expected behavior
No warnings in console.
4. Actual behavior
5. Environment
Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Firefox: 53.0 (64-bit)
Thanks.