Topic: Accordion open long block
Volodymyr Yatsynych pro asked 6 years ago
Hello.
If open first very long block, and next open small block web browser set position to down of the page.
Open first Siemens IMMULITE 2000, scroll, and next open, Abbott Cell-Dyne 3200
Equipment
ver. 4.5.13 (please add to version select)
Add comment
Jakub Strebeyko staff answered 6 years ago
Hi there Volodymyr,
Thanks for reaching out with this! The behavior is stemming out from the fact that
1.
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.
Status
Answered
Specification of the issue
- ForumUser: 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
Tags