ScrollTop allways 0
See original GitHub issueI have this modal where Simple bar is initiated and a form is displayed.
el = new SimpleBar($('.fullModal .modal-body')[0]);
When the modal is closed and opened again, the scroll bar remains where it was last placed.
console.log(el.getScrollElement().scrollTop);
Reveals that no matter where the scroll bar is placed it is set to 0, and when I try to set it equal to some value, it ignores it completely.
I need to be able to set scrollTop = 0 and have it actually got to the top.
Thank you for your work. Santiago.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
element.scrollTop always returns 0 - Stack Overflow
When an element content does not generate a vertical scrollbar, then its scrollTop value defaults to 0." Since the content of inner doesn't...
Read more >My scrollTop value is not working? scrollTop, offsetTop ...
I've carelessly asked for the scrollTop position of an element and it would always return 0 . In this case, I have to...
Read more >ScrollY is always equal to 0 · Issue #2329 · nuxt/nuxt.js - GitHub
Hi all, I'm building a folio using Nuxt and Contentful, and I am encountering some issues on how to get the current vertical...
Read more >scrollTop in iFrame always returns 0 - jQuery - Bug Tracker
scrollTop () in iFrame always returns 0. To reproduce, load an iFrame from a secondary page. In the iFrame page, specify a scroll...
Read more >2891 - document.documentElement.scrollTop always returns ...
scrollTop always returns zero and can't be set. Reported by schedule broth. ... The scrollTop property remains zero and scroll position does not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Cyrus-d you are doing
getContentElement
instead ofgetScrollElement
.@ppazos, I have the same issue and I cannot use the
getScrollElement
for the same reason. @Grsmto, can you please look into this and solve this issue?