Topic: Accordion open long block
Volodymyr Yatsynych pro asked 6 years ago
Jakub Strebeyko staff answered 6 years ago
window.pageYOffset
is calculated starting from the top of document;
2. opening the big block creates space for scrolling, which gets traversed on the way to the small block (making the value from point 1. go up);
3. closing the big block is again altering the scrolling space by shortening it, yet the window.pageYOffset
stays the same (meaning: scrolled waaay down), pushing the viewport violently down.
It is the expected behavior and workarounds would not be pretty.
To avoid it, Accordion tabs should be of similar heights.
The docs should reflect this fact soon.
With Best Regards,
Kuba FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.5.10
- Device: Laptop, mobile
- Browser: Firefox, Safary
- OS: Windows, iOS
- Provided sample code: No
- Provided link: Yes