Topic: Mdb Angular InfiniteScroll not firing when screen Scale set to 125%
HanoRossouw
priority
asked 12 hours ago
*_Expected behavior_*Expected behavior when using infinitescrolling directive is when scrolling to the end of the container the infiniteScrollCompleted event should fire.
*_Actual behavior_*When display Screen Scale is set to 100% the event fires correctly. when i modify the display's screen scale to 125% which is a default on many machines the infiniteScrollCompleted event is not firing and i got some proof of the scroll value coming up differently
Resources (screenshots, code snippets etc.)
The interesting thing to note is the rectangle here is height 220 and the scrolltop when it works reaches 126 and then the 2 combined is equal to scrollheight which is 346 and the event fires correctly. When the scale is 125% the scrolltop at the end calculates to 125.5999984741211 which is just shy of reaching the final value for the scroll complete event to fire.
Is it possible to propose a fix to either round the scroll up using Math.ceil() then 125.59999 would become 126 and then the event would fire correctly. I mean this use case is to load more items onto the DOM so cannot think it would negatively impact anyone by rounding up the scrolltop value to workaround this issue where the browser is parsing scrolltop differently due to desktop screen scaling. Even just doing +1 when the calculation is for a container would resolve the issue
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Opened
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Angular
- MDB Version: MDB5 6.1.0
- Device: PC
- Browser: Chrome, Edge, Firefox
- OS: Windows 11
- Provided sample code: No
- Provided link: No