KingSora / OverlayScrollbars

A javascript scrollbar plugin that hides the native scrollbars, provides custom styleable overlay scrollbars, and preserves the native functionality and feel.
https://kingsora.github.io/OverlayScrollbars
MIT License
3.78k stars 214 forks source link

t.animate is not a function. #562

Closed yuchiXiong closed 11 months ago

yuchiXiong commented 11 months ago

Describe the bug Now OverlayScrollbars seems to use the HTMLElement.prototype.animate API.

However, the minimum version requirement of this API on IOS devices is IOS13.4, when I used OverlayScrollbars on IOS13.3.1 device, OverlayScrollbars tell me "t.animate is not a function". then blocking the subsequent logic of the page.

I found a github repo that provides a working solution, and now I want to know if OverlayScrollbars can provide a corresponding solution (……or make this issue more effective to help other people who encounter similar problems? πŸ˜‚πŸ˜‚πŸ˜‚)

To Reproduce Steps to reproduce the behavior:

  1. find a IOS devices and need IOS version less than 13.4
  2. install OverlayScrollbars and init it
  3. check the console
  4. now you can see a "t.animate is not a function" error.

Expected behavior Is it possible for OverlayScrollbars to be compatible with it? (Or I hope this issue can effectively help other developers who may face this problem solve this problemπŸ˜‚)

KingSora commented 11 months ago

Good day @yuchiXiong

OverlayScrollbars should only use element.animate when the browser also supports the ScrollTimelineApi. I just forgot to guard the call to element.animate in this case.

I'll fix this as fast as possible an release a new patch version

KingSora commented 11 months ago

@yuchiXiong I've published v2.3.2 which should fix this bug. Please try it out and report back to me :)

yuchiXiong commented 11 months ago

@yuchiXiong I've published v2.3.2 which should fix this bug. Please try it out and report back to me :)

It's working great now, that's cool! πŸŽ‰πŸŽ‰πŸŽ‰

ellockie commented 11 months ago

This was breaking a bunch of unit tests, thank you for fixing it, @KingSora !